A simple full-stack Task Manager application built with React, Node.js, PostgreSQL, and Prisma.
- Add new tasks with a title and optional details.
- View all tasks in a paginated table.
- Mark tasks as complete or pending.
- Delete tasks.
- API documentation with Swagger.
- Unit tests for both frontend and backend.
- Frontend: React, Vite, Tailwind CSS, Axios, react-toastify
- Backend: Node.js, Express, Prisma, PostgreSQL, Zod, Jest, Supertest
- Database: PostgreSQL (running in Docker)
- Node.js (v16 or later)
- Docker and Docker Compose
-
Clone the repository (if applicable):
git clone <repository-url> cd task-manager
-
Install backend dependencies:
cd backend npm install
-
Install frontend dependencies:
cd ../frontend npm install
-
Start the database: From the root directory, run:
docker-compose up -d
-
Run database migrations: From the
backend
directory, run:npx prisma migrate dev
-
Start the backend server: In a new terminal, from the
backend
directory, run:npm run dev
The backend will be running at
http://localhost:5000
. -
Start the frontend server: In another new terminal, from the
frontend
directory, run:npm run dev
The frontend will be running at
http://localhost:5173
.
- Navigate to the
backend
directory:cd backend
- Run the tests:
npm test
- Navigate to the
frontend
directory:cd frontend
- Run the tests:
npm test
The API documentation is generated with Swagger and is available at http://localhost:5000/api-docs
when the backend server is running.