This project is a full-stack Todo application built with Angular for the frontend and NestJS for the backend. It demonstrates a simple yet effective way to manage tasks with user authentication and authorization.
- User Authentication: Secure login and registration using JWT.
- Task Management: Create, view, and manage todos.
- User-Specific Todos: Each user can only view and manage their own todos.
- Responsive Design: Built with Angular Material for a modern UI.
- API Documentation: Swagger documentation for backend APIs.
- Upcoming Features: Edit and delete functionality for todos in the frontend.
- Node.js: Ensure you have Node.js installed (version 14 or later recommended).
- Angular CLI: Install Angular CLI globally using
npm install -g @angular/cli. - NestJS CLI: Install NestJS CLI globally using
npm install -g @nestjs/cli. - PostgreSQL: Ensure you have a PostgreSQL database running.
-
Navigate to the backend directory:
cd nest -
Install dependencies:
npm install
-
Configure the database:
-
Create a
.envfile in thenestdirectory with the following content:DATABASE_HOST=localhost DATABASE_PORT=5432 DATABASE_USER=your_db_user DATABASE_PASSWORD=your_db_password DATABASE_NAME=your_db_name JWT_SECRET=your_jwt_secret
-
-
Run database migrations:
npm run typeorm migration:run
-
Start the backend server:
npm run start:dev
The backend server will start on
http://localhost:3000.
-
Navigate to the frontend directory:
cd frontend-app -
Install dependencies:
npm install
-
Start the frontend server:
npm start
The frontend application will start on
http://localhost:4200.
- Access the Swagger API documentation at
http://localhost:3000/api.
- Backend: Use
npm run start:devfor hot-reloading during development. - Frontend: Use
ng servefor live-reloading during development.
Contributions are welcome! Please fork the repository and submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License.