- 🤖 Introduction
- ⚙️ Tech Stack
- 🔋 Features
- 🤸 Quick Start
- 🕸️ API Documentation
- 🔗 Links
- 🚀 More
Build a production-ready Todo Management System API that handles user authentication, task management, and real-time updates. This scalable backend is built with modern technologies and follows best practices for enterprise-grade applications.
The system provides a robust GraphQL API that allows users to:
- Create, read, update, and delete todos
- Manage user authentication and authorization
- Organize tasks with categories and priorities
- Track task completion status
- Backend Framework: Node.js with Express
- API: GraphQL with Apollo Server
- Database: PostgreSQL with Prisma ORM
- Authentication: JWT (JSON Web Tokens)
- Testing: Jest
- Containerization: Docker
- Language: TypeScript
👉 GraphQL API: Flexible and efficient data querying with Apollo Server
👉 Authentication & Authorization: Secure user management with JWT tokens
👉 Database Integration: Robust data modeling with Prisma ORM
👉 Type Safety: Full TypeScript support for better development experience
👉 Testing: Comprehensive test suite with Jest
👉 Docker Support: Easy deployment with containerization
👉 API Documentation: Auto-generated GraphQL schema documentation
Follow these steps to set up the project locally on your machine.
Prerequisites
Make sure you have the following installed on your machine:
Cloning the Repository
git clone <your-repo-url>
cd todo_backend
Installation
Install the project dependencies:
npm install
Set Up Environment Variables
Create a new file named .env
in the root of your project and add the following content:
# Server Configuration
PORT=4000
NODE_ENV=development
# Database
DATABASE_URL="postgresql://user:password@localhost:5432/todo_db"
# JWT
JWT_SECRET=your_jwt_secret
JWT_EXPIRES_IN=1d
Database Setup
# Generate Prisma client
npm run db:generate
# Run migrations
npm run db:migrate
# Seed the database (optional)
npm run db:seed
Running the Project
Development mode:
npm run dev
Production mode:
npm run build
npm start
Using Docker:
docker-compose up
The GraphQL playground will be available at http://localhost:4000
query {
todos {
id
title
description
completed
createdAt
user {
id
name
}
}
}
mutation {
createTodo(
input: {
title: "Learn GraphQL"
description: "Master GraphQL with Apollo Server"
}
) {
id
title
description
completed
}
}
- Prisma Documentation: https://www.prisma.io/docs
- Apollo Server: https://www.apollographql.com/docs/apollo-server
- GraphQL: https://graphql.org/learn
- TypeScript: https://www.typescriptlang.org/docs
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you need help or have questions, please open an issue in the repository.
Prathamesh Patil - GitHub
This project is licensed under the MIT License - see the LICENSE file for details.