https://github.com/riceball-tw/my-note
MySQL + Drizzle ORM + Nuxt 3 fullstack modern note site.
https://github.com/riceball-tw/my-note
drizzle-orm jwt mysql nuxt shadcn-ui
Last synced: 2 months ago
JSON representation
MySQL + Drizzle ORM + Nuxt 3 fullstack modern note site.
- Host: GitHub
- URL: https://github.com/riceball-tw/my-note
- Owner: riceball-tw
- Created: 2025-01-02T11:18:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-06T12:28:59.000Z (about 1 year ago)
- Last Synced: 2025-06-06T13:20:08.052Z (about 1 year ago)
- Topics: drizzle-orm, jwt, mysql, nuxt, shadcn-ui
- Language: Vue
- Homepage:
- Size: 1.09 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## MyNote

A MySQL + Drizzle ORM + Nuxt 3 fullstack modern note site.
## Features
- 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
## How to Start
### Install Dependence
```bash
pnpm install
```
### Setup `.env`
```bash
DATABASE_URL=mysql://user:password@localhost:3306/your_database
JWT_SECRET=***
```
Search for online JWT secret generator or generate by using node script.
``` bash
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
```
### Database Migrations
For more, you can refer to [drizzle migrations document](https://orm.drizzle.team/docs/migrations)
```bash
npx drizzle-kit generate
npx drizzle-kit push
```
### Start the dev server!
```bash
pnpm dev
```
## Database Schema
```mermaid
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"
```