65 lines
1.2 KiB
Markdown
65 lines
1.2 KiB
Markdown
# Wishlist App
|
|
|
|
A wishlist application built with SvelteKit, Drizzle ORM, and PostgreSQL.
|
|
|
|
## Prerequisites
|
|
|
|
- [Bun](https://bun.sh/)
|
|
- PostgreSQL database
|
|
|
|
## Local Development
|
|
|
|
```bash
|
|
# Install dependencies
|
|
bun install
|
|
|
|
# Copy environment file
|
|
cp .env.example .env
|
|
|
|
# Edit .env with your DATABASE_URL
|
|
# DATABASE_URL=postgresql://username:password@localhost:5432/wishlist
|
|
|
|
# Set up database
|
|
bun run db:push
|
|
|
|
# Start development server
|
|
bun run dev
|
|
```
|
|
|
|
Visit `http://localhost:5173`
|
|
|
|
## Docker
|
|
|
|
```bash
|
|
docker-compose up -d
|
|
docker-compose exec app bun run db:push
|
|
```
|
|
|
|
Visit `http://localhost:3000`
|
|
|
|
## Database Commands
|
|
|
|
- `bun run db:push` - Push schema to database (development)
|
|
- `bun run db:generate` - Generate migrations
|
|
- `bun run db:migrate` - Run migrations (production)
|
|
- `bun run db:studio` - Open Drizzle Studio
|
|
|
|
## Key Files
|
|
|
|
- `src/lib/server/schema.ts` - Database schema
|
|
- `src/lib/server/db.ts` - Database connection
|
|
- `src/routes/` - Pages and API endpoints
|
|
- `src/auth.ts` - Authentication configuration
|
|
- `.env` - Environment variables (copy from `.env.example`)
|
|
|
|
## Production Build
|
|
|
|
```bash
|
|
bun run build
|
|
bun run preview
|
|
```
|
|
|
|
## License
|
|
|
|
AGPL-3.0 - This project may only be used in open source projects.
|