A daily laser puzzle game where players place mirrors on a grid to redirect a laser beam, aiming for the longest path possible. New puzzles every day!
Play now: https://laser-puzzle-game.vercel.app/
- Node.js 20+
- Docker (for local PostgreSQL database)
npm installFirst time setup:
# Start Docker daemon (WSL/Linux)
sudo service docker start
# Create and start Postgres container
docker run --name laser-postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=laser_puzzle -p 5432:5432 -d postgres:16Subsequent runs:
# Start Docker daemon (WSL/Linux)
sudo service docker start
# Start existing container
npm run db:startCreate a .env file in the project root:
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/laser_puzzle"# Run migrations
npx prisma migrate dev
# Seed the database with puzzle levels
npm run db:seednpm run devOpen http://localhost:3000 to play.
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Create production build |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run db:start |
Start PostgreSQL Docker container |
npm run db:seed |
Seed database with puzzle levels |
npm run db:reset |
Reset database and run migrations |
- Framework: Next.js 16 (App Router)
- UI: React 19, Tailwind CSS 4
- Database: PostgreSQL with Prisma ORM
- Analytics: Vercel Analytics
- Language: TypeScript