2.1 KiB
2.1 KiB
NoteApp — Fullstack Project
一款支持多端同步、Markdown 编辑和标签管理的笔记应用。
Architecture
apps/
├── web/ # Next.js 15 + TypeScript + Tailwind CSS
└── api/ # Fastify 5 + TypeScript + SQLite (sql.js)
packages/
├── shared-types/ # @shared/types — shared TypeScript interfaces
└── shared-config/ # @shared/config — shared configuration
Quick Start
# Install all dependencies (root + workspaces)
npm install
# Start both frontend and backend in dev mode
npm run dev
# Or start individually
npm run dev:web # http://localhost:3000
npm run dev:api # http://localhost:3001
Build
# Build everything
npm run build
# Or individually
npm run build:web
npm run build:api
Testing
# Run API tests
npm test
API Endpoints
Auth
POST /api/auth/registerPOST /api/auth/loginGET /api/auth/me
Resources
users
GET /api/users— ListGET /api/users/:id— GetPOST /api/users— CreatePUT /api/users/:id— UpdateDELETE /api/users/:id— Delete
customers
GET /api/customers— ListGET /api/customers/:id— GetPOST /api/customers— CreatePUT /api/customers/:id— UpdateDELETE /api/customers/:id— Delete
sales_pipeline
GET /api/sales_pipeline— ListGET /api/sales_pipeline/:id— GetPOST /api/sales_pipeline— CreatePUT /api/sales_pipeline/:id— UpdateDELETE /api/sales_pipeline/:id— Delete
follow_ups
GET /api/follow_ups— ListGET /api/follow_ups/:id— GetPOST /api/follow_ups— CreatePUT /api/follow_ups/:id— UpdateDELETE /api/follow_ups/:id— Delete
dashboard
GET /api/dashboard— ListGET /api/dashboard/:id— GetPOST /api/dashboard— CreatePUT /api/dashboard/:id— UpdateDELETE /api/dashboard/:id— Delete
System
GET /api/health— Health check
Environment Variables
See .env.example for all available configuration.