Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
/ Arlekin Public archive

Arlekin is a collaborative map platform allowing users to place pins with video links on a global map. This project was created for the International Festival Arlekin.

License

Notifications You must be signed in to change notification settings

Crea7orX/Arlekin

Repository files navigation

Arlekin 🌍

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.

🎭 About

This project was created for the International Festival Arlekin.


📚 Documentation in Multiple Languages

This documentation is available in the following languages:

  • en
  • bg

✨ Features

  • 🗺️ 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

🧭 Project Structure

Arlekin/
├── src/
├── public/
├── .env.example
├── docker-compose.yml
├── docker-compose-without-db.yml
├── Dockerfile
└── drizzle.config.ts

⚙️ Environment Setup

  1. Clone the repository:

    git clone https://github.com/Crea7orX/Arlekin.git
    cd Arlekin
  2. Copy and edit .env file:

    cp .env.example .env
  3. Set API base URL:

    NEXT_PUBLIC_API_BASE_URL=http://localhost:3000/api
  4. Fill in Clerk credentials:

    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_
    CLERK_SECRET_KEY=sk_test_
  5. Configure Database:

    DATABASE_URL=postgresql://postgres:postgres@postgres:5432/arlekin

🐳 Running with Docker

  1. Start services:

    docker-compose up -d --build
  2. 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 --build

🧪 Local Development (No Docker)

pnpm install
pnpm dev

🗃️ Available Scripts

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

🔐 Clerk Integration

  • Auth middleware configured in src/middleware.ts
  • Frontend uses @clerk/nextjs for auth UI
  • Protected API routes under src/app/api
    Ensure all Clerk environment variables are set.

🧭 Map & Pin Customization

Main code lies in:

  • src/components/map-section.tsx
  • src/components/pin-add-dialog.tsx
  • src/app/api/pins/*

🧼 Cleanup

Stop and remove services:

docker-compose down

Also remove volumes:

docker-compose down --volumes

🚀 Deployment Tips

  • 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

📄 License

This project is open-source under the GNU GPL-3 License.

About

Arlekin is a collaborative map platform allowing users to place pins with video links on a global map. This project was created for the International Festival Arlekin.

Topics

Resources

License

Stars

Watchers

Forks