本說明僅供參考,請以 README-CN.md(中文版說明文件)為準。
A full-stack web application for course and task management, featuring a modern Next.js frontend and a secure FastAPI backend.
Suma is designed to help users manage courses and tasks efficiently. It provides authentication, a user-friendly interface, and secure data handling.
- User registration and login (JWT-based authentication)
- Course and task management
- Responsive UI with Radix UI components
- Secure backend with FastAPI and SQLite
- API endpoints for authentication and user management
- Next.js
- React
- Radix UI
- Tailwind CSS/PostCSS
- TypeScript
- FastAPI
- SQLite (default, can switch to Postgres)
- SQLAlchemy
- JWT (python-jose)
- Passlib (bcrypt)
- Pydantic
- Install dependencies:
pnpm install
- Start the development server:
The app will run at http://localhost:3000
pnpm dev
- Navigate to the backend folder:
cd backend
- Create and activate a virtual environment:
python -m venv .venv .venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- (Optional) Configure environment variables:
- Copy
.env.example
to.env
and edit as needed. - Default database is SQLite. To use Postgres, update
DATABASE_URL
.
- Copy
- Start the backend server:
Access Swagger docs at http://localhost:8000/docs
uvicorn app.main:app --reload --port 8000
- Register and log in to access course and task features.
- Use the provided UI to manage your courses and tasks.
- Backend API endpoints:
POST /auth/register
— Register a new userPOST /auth/login
— Log inPOST /auth/refresh
— Refresh access tokenPOST /auth/logout
— Log outGET /users/me
— Get current user info
Suma/
├── app/ # Next.js frontend
├── backend/ # FastAPI backend
├── components/ # Shared React components
├── hooks/ # Custom React hooks
├── lib/ # Utility functions
├── public/ # Static assets
├── styles/ # Global styles
├── package.json # Frontend dependencies
├── backend/requirements.txt # Backend dependencies
Contributions are welcome! Please open issues or submit pull requests for improvements or bug fixes.