
todos next nest js
使用 NextJS 和 NestJS 构建的全栈待办事项应用,支持用户认证和任务管理。
Repository Info
About This Server
使用 NextJS 和 NestJS 构建的全栈待办事项应用,支持用户认证和任务管理。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Todo Application
A full-stack todo application built with NextJS frontend and NestJS backend, featuring user authentication and todo management.
Features
- User Authentication: Sign up and sign in functionality
- User Management: Secure user registration with email and username
- Todo Management: Create, view, and manage todos with different statuses
- Public Todo Feed: View todos created by all users on the homepage
- Personal Todo Dashboard: Manage your own todos in a dedicated page
- Modern UI: Clean and responsive design using Tailwind CSS and Shadcn UI components
Tech Stack
Backend (NestJS)
- Framework: NestJS with TypeScript
- Database: SQLite with TypeORM
- Authentication: JWT tokens with Passport.js
- Validation: class-validator and class-transformer
- Password Hashing: bcryptjs
Frontend (NextJS)
- Framework: NextJS 14 with App Router
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: Shadcn UI with Radix UI primitives
- HTTP Client: Axios
- State Management: React Context for authentication
Project Structure
├── backend/ # NestJS backend
│ ├── src/
│ │ ├── auth/ # Authentication module
│ │ ├── users/ # User management module
│ │ ├── todos/ # Todo management module
│ │ └── main.ts # Application entry point
│ └── package.json
├── frontend/ # NextJS frontend
│ ├── src/
│ │ ├── app/ # App router pages
│ │ ├── components/ # Reusable UI components
│ │ ├── lib/ # Utilities and API client
│ │ └── types/ # TypeScript type definitions
│ └── package.json
└── README.md
Getting Started
Prerequisites
- Node.js (v18 or higher)
- npm or yarn
Installation
-
Clone the repository
git clone <repository-url> cd mcp-tools-demo -
Install backend dependencies
cd backend npm install -
Install frontend dependencies
cd ../frontend npm install
Running the Application
-
Start the backend server
cd backend npm run start:devThe backend will run on
http://localhost:3001 -
Start the frontend server (in a new terminal)
cd frontend npm run devThe frontend will run on
http://localhost:3000
Usage
- Homepage: Visit
http://localhost:3000to see all public todos - Sign Up: Create a new account at
/signup - Sign In: Login to your account at
/signin - My Todos: Access your personal todo dashboard at
/todos(requires authentication)
API Endpoints
Authentication
POST /auth/signup- Create a new user accountPOST /auth/login- Login with email/username and password
Todos
GET /todos- Get all public todosPOST /todos- Create a new todo (requires authentication)GET /todos/my-todos- Get current user's todos (requires authentication)
Database Schema
Users Table
id- Primary keyemail- Unique email addressusername- Unique usernamepassword- Hashed passwordcreatedAt- Creation timestampupdatedAt- Last update timestamp
Todos Table
id- Primary keyname- Todo titledescription- Todo descriptionstatus- Todo status (pending, in_progress, completed)userId- Foreign key to users tablecreatedAt- Creation timestampupdatedAt- Last update timestamp
Security Features
- Password hashing using bcryptjs
- JWT token-based authentication
- Input validation and sanitization
- CORS configuration for frontend-backend communication
- Protected routes requiring authentication
Development
Backend Development
cd backend
npm run start:dev # Start in watch mode
npm run build # Build for production
npm run test # Run tests
Frontend Development
cd frontend
npm run dev # Start development server
npm run build # Build for production
npm run lint # Run ESLint
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This project is licensed under the ISC License.
Quick Start
Clone the repository
git clone https://github.com/rebase-master/todos-next-nest-jsInstall dependencies
cd todos-next-nest-js
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.