Prerequisites
Before you begin, ensure you have the following installed on your system:Install Bun
Coffee Finder uses Bun as its package manager and runtime. Install Bun by running:Verify the installation:
Bun is a fast all-in-one JavaScript runtime that serves as a drop-in replacement for Node.js. It includes a package manager, bundler, and test runner.
Install Node.js (optional)
While Bun is the primary runtime, some tools may require Node.js. Install Node.js 18+ if needed:Visit nodejs.org for other installation methods.
Verify Git installation
Clone the repository
Clone the Coffee Finder repository to your local machine:Install dependencies
Install all required packages using Bun:package.json, including:
- Next.js 16 - React framework with App Router
- TypeScript 5 - Type-safe JavaScript
- Tailwind CSS 4 - Utility-first CSS framework
- Prisma 6 - Database ORM
- shadcn/ui - UI component library
- Leaflet - Interactive map library
- React Query - Data fetching and caching
- Zustand - State management
The complete list of dependencies can be found in
/home/daytona/workspace/source/package.json.Database setup
Coffee Finder uses SQLite with Prisma ORM for data persistence. The database stores user information and posts.Configure database URL
Create a Add the database connection string:
.env file in the project root:.env
SQLite is used by default for simplicity. For production, consider PostgreSQL or MySQL.
Review the Prisma schema
The database schema is defined in
prisma/schema.prisma:prisma/schema.prisma
Generate Prisma client
Generate the Prisma client based on your schema:This command runs
prisma generate and creates the TypeScript types for your database.Environment variables
Coffee Finder requires minimal environment configuration. Create a.env file with the following variables:
.env
Environment variable reference
Environment variable reference
| Variable | Required | Description | Default |
|---|---|---|---|
DATABASE_URL | Yes | Prisma database connection string | file:./db/custom.db |
Coffee Finder uses the public Overpass API endpoint (
https://overpass-api.de/api/interpreter) directly in the code. No API key is required.Verify installation
Start the development server to verify everything is working:Available scripts
The following scripts are available inpackage.json:
| Script | Command | Description |
|---|---|---|
dev | bun run dev | Start development server on port 3000 |
build | bun run build | Build for production with standalone output |
start | bun run start | Start production server |
lint | bun run lint | Run ESLint for code quality |
db:push | bun run db:push | Push schema changes to database |
db:generate | bun run db:generate | Generate Prisma client |
db:migrate | bun run db:migrate | Run database migrations |
db:reset | bun run db:reset | Reset database to initial state |
Troubleshooting
Bun installation fails
Bun installation fails
If Bun installation fails, try:
- Ensure you have curl installed:
curl --version - Use npm as alternative:
npm install -g bun - Check system requirements at bun.sh
Database connection errors
Database connection errors
If you encounter database errors:
- Verify
.envfile exists withDATABASE_URL - Ensure
dbdirectory exists:mkdir -p db - Run
bun run db:pushto create the database - Check file permissions on the
dbdirectory
Port 3000 already in use
Port 3000 already in use
If port 3000 is occupied:Or kill the process using port 3000:
TypeScript errors during development
TypeScript errors during development
The project uses
ignoreBuildErrors: true in next.config.ts for flexibility. To enable strict type checking:- Edit
next.config.ts - Set
ignoreBuildErrors: false - Run
bun run lintto check for issues
Next steps
Now that you have Coffee Finder installed:- Configure the application - Customize settings and behavior
- Deploy to production - Learn deployment options
- Customize the theme - Modify colors and styling