First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
- Next.js 16
- App Router
- Server Actions
- Drizzle ORM / SQLite
- Turso Database
- REST API
- TypeScript
- Tailwind CSS
- Authentication with 🛠 Iron Session
- SWR
- AI integrated (support Gemini Agent API)
-
Clone this repository
-
Install dependencies:
npm install
-
Set up your environment variables:
cp .env.example .env
Fill in your Turso database credentials:
API_KEY=your_cat_api_key TURSO_DATABASE_URL=your_turso_database_url TURSO_AUTH_TOKEN=your_turso_auth_token -
Run the local development:
You can also run these commands to quickly run local development app.
turso dev --db-file src/db/local.db npm run dev:local
These commands will create (if not exist) local.db at directory src/db and serve it at http://localhost:8080 and the front-end will connect to that database connection.
This project uses Drizzle ORM for database operations. Here are the available commands:
npm run db:generate- Generate migration files from schema changesnpm run db:push- Push schema changes directly to the database (use with caution)npm run db:migrate- Run migrations against the databasenpm run db:studio- Open the Drizzle Studio for database management