Arlekin is a collaborative map platform allowing users to place pins with video links on a global map. Built with Next.js 15 (App Router), PostgreSQL, Drizzle ORM, Leaflet, and Clerk for authentication.
This project was created for the International Festival Arlekin.
This documentation is available in the following languages:
- 🗺️ Interactive world map using Leaflet
- 📍 Add and manage pins with metadata and video links
- 🔐 Secure authentication via Clerk
- 🐳 Fully Docker-enabled for easy deployment
- 📦 Powered by Drizzle ORM and PostgreSQL
Arlekin/
├── src/
├── public/
├── .env.example
├── docker-compose.yml
├── docker-compose-without-db.yml
├── Dockerfile
└── drizzle.config.ts
-
Clone the repository:
git clone https://github.com/Crea7orX/Arlekin.git cd Arlekin -
Copy and edit .env file:
cp .env.example .env
-
Set API base URL:
NEXT_PUBLIC_API_BASE_URL=http://localhost:3000/api
-
Fill in Clerk credentials:
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_ CLERK_SECRET_KEY=sk_test_
-
Configure Database:
DATABASE_URL=postgresql://postgres:postgres@postgres:5432/arlekin
-
Start services:
docker-compose up -d --build
-
Frontend: http://localhost:3000
API: http://localhost:3000 (same app via Next.js)
If you prefer an external database, use:
docker-compose -f docker-compose-without-db.yml up -d --buildpnpm install
pnpm dev| Command | Description |
|---|---|
pnpm dev |
Start development server |
pnpm build |
Build production version |
pnpm start |
Run production server |
pnpm db:generate |
Generate database schema migrations |
pnpm db:push |
Apply database schema migrations |
- Auth middleware configured in
src/middleware.ts - Frontend uses
@clerk/nextjsfor auth UI - Protected API routes under
src/app/api
Ensure all Clerk environment variables are set.
Main code lies in:
src/components/map-section.tsxsrc/components/pin-add-dialog.tsxsrc/app/api/pins/*
Stop and remove services:
docker-compose downAlso remove volumes:
docker-compose down --volumes- Push images to DockerHub or another registry
- Use Docker Compose or Kubernetes in production
- Enable SSL via Traefik/Nginx
- Store env vars in a secrets manager
- Schedule regular backups of your PostgreSQL data
This project is open-source under the GNU GPL-3 License.