A MySQL + Drizzle ORM + Nuxt 3 fullstack modern note site.
- Nuxt 3 Universal Rendering mode, support both SSR and CSR
- TypeScript + Drizzle ORM + Zod for Safety
- Tailwind + Shadcn Vue for fast UI iteration
- JWT based Auth
- RWD UI for mobile and desktop
pnpm install
DATABASE_URL=mysql://user:password@localhost:3306/your_database
JWT_SECRET=***
Search for online JWT secret generator or generate by using node script.
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
For more, you can refer to drizzle migrations document
npx drizzle-kit generate
npx drizzle-kit push
pnpm dev
erDiagram
USERS {
int id PK "Auto-increment primary key"
varchar email "Unique and not null"
varchar password "Not null"
}
NOTES {
int id PK "Serial primary key"
int user_id FK "Foreign key references USERS.id"
text text "Optional text content"
timestamp created_at "Default to current date, not null"
timestamp updated_at "Default to current date, updates automatically"
}
USERS ||--o{ NOTES : "has many"