2.7 KiB
2.7 KiB
Quick Setup Guide
Follow these steps to get your wishlist app running:
Choose Your Setup Method
Method 1: Docker Compose (Easiest) 🐳
If you have Docker installed, this is the fastest way to get started:
# Start everything with Docker
docker-compose up -d
# Run database migrations
docker-compose exec app bun run db:push
# View logs
docker-compose logs -f app
Visit http://localhost:3000 🎉
To stop:
docker-compose down
Method 2: Local Development (Traditional)
1. Prerequisites
Make sure you have:
- ✅ Bun installed (already done!)
- ✅ PostgreSQL database running
Setting up PostgreSQL (if needed)
Option A: Local PostgreSQL
# Install PostgreSQL (Ubuntu/Debian)
sudo apt install postgresql postgresql-contrib
# Start PostgreSQL
sudo systemctl start postgresql
# Create a database
sudo -u postgres createdb wishlist
# Create a user and grant permissions
sudo -u postgres psql
CREATE USER wishlistuser WITH PASSWORD 'yourpassword';
GRANT ALL PRIVILEGES ON DATABASE wishlist TO wishlistuser;
\q
Option B: Docker PostgreSQL
docker run --name wishlist-postgres \
-e POSTGRES_DB=wishlist \
-e POSTGRES_USER=wishlistuser \
-e POSTGRES_PASSWORD=yourpassword \
-p 5432:5432 \
-d postgres:16
Option C: Hosted Database
2. Configure Environment
Create .env file:
cp .env.example .env
Edit .env with your database connection:
DATABASE_URL=postgresql://wishlistuser:yourpassword@localhost:5432/wishlist
3. Setup Database
# Push the schema to your database
bun run db:push
4. Start Development Server
bun run dev
Visit http://localhost:5173 🎉
Troubleshooting
Database Connection Issues
If you get connection errors:
-
Check PostgreSQL is running:
# Linux/Mac sudo systemctl status postgresql # Docker docker ps | grep postgres -
Verify connection string format:
postgresql://username:password@host:port/database -
Test connection:
psql "postgresql://wishlistuser:yourpassword@localhost:5432/wishlist"
Port Already in Use
If port 5173 is taken:
bun run dev -- --port 3000
Schema Changes
After modifying src/lib/server/schema.ts:
bun run db:push
Next Steps
- Create your first wishlist
- Add some items
- Share the public link with friends
- Save your owner link somewhere safe!
Production Deployment
See the main README.md for deployment instructions.