Skip to content

Commit

Permalink
docs: Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
riceball-tw committed Jan 7, 2025
1 parent 72a2780 commit bc43129
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 51 deletions.
96 changes: 45 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,75 +1,69 @@
# Nuxt Minimal Starter
## MyNote

Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
![App demo](assets/demo.png)

## Setup
A MySQL + Drizzle ORM + Nuxt 3 fullstack modern note site.

Make sure to install dependencies:
## Features

```bash
# npm
npm install
- 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
pnpm install
## How to Start

# yarn
yarn install
### Install Dependence

# bun
bun install
```bash
pnpm install
```

## Development Server

Start the development server on `http://localhost:3000`:
### Setup `.env`

```bash
# npm
npm run dev

# pnpm
pnpm dev
DATABASE_URL=mysql://user:password@localhost:3306/your_database
JWT_SECRET=***
```

# yarn
yarn dev
Search for online JWT secret generator or generate by using node script.

# bun
bun run dev
``` bash
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
```

## Production
### Database Migrations

Build the application for production:
For more, you can refer to [drizzle migrations document](https://orm.drizzle.team/docs/migrations)

```bash
# npm
npm run build

# pnpm
pnpm build

# yarn
yarn build

# bun
bun run build
npx drizzle-kit generate
npx drizzle-kit push
```

Locally preview production build:
### Start the dev server!

```bash
# npm
npm run preview

# pnpm
pnpm preview

# yarn
yarn preview

# bun
bun run preview
pnpm dev
```

Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
## 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"
```
Binary file added assets/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bc43129

Please sign in to comment.