Educational project. Full-stack web application for task management with authentication.
- Fastify + TypeScript
- PostgreSQL (raw SQL via pg)
- JWT (@fastify/jwt) stored in cookies
- bcrypt for password hashing
- Pug template engine (SSR)
- User registration with validation
- Login with JWT authentication
- Create, update and delete tasks
- Each user sees only their own tasks
- Server-side rendering via Pug templates
- Raw SQL queries via
pgconnection pool (no ORM) - Repository pattern for data access
preHandlermiddleware for route protection- Custom error handler with user-friendly messages
- Clone the repository
- Install dependencies:
npm install- Create
.envfile based on.env.example:
DATABASE_URL=postgresql://user:password@localhost:5432/dbname
JWT_SECRET=your_secret_key
- Start the project:
npm run dev- task-manager-api — NestJS version of the same project