Ngtly is an open-source platform that indexes and aggregates nightlife events from around the world. Our mission is to connect party-goers with the best events, clubs, and venues across different cities and countries.
- π Multi-City Support: Events from major cities across Europe and beyond
- π΅ Music Genre Filtering: Find events by your preferred music style
- π Real-time Updates: Fresh event data with automatic scraping
- πΊοΈ Interactive Maps: Visual event discovery with location-based search
- π± Mobile-First Design: Optimized for mobile and desktop experiences
- π Multi-Language: Support for multiple languages and locales
This is a monorepo built with modern technologies:
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Prisma - Database ORM with PostgreSQL
- Tailwind CSS - Utility-first CSS framework
- Bun - Fast JavaScript runtime and package manager
ngtly/
βββ packages/
β βββ ngtly/ # Main Next.js application
β βββ scraper/ # Background event scraping services
β βββ scheduler/ # Automated task scheduling
β βββ shared/ # Shared utilities and types
βββ loadEnv.ts # Environment loader
βββ env.js # Environment validation
βββ biome.json # Code formatting and linting
- Bun (recommended) or Node.js 18+
- PostgreSQL database
- Environment variables configured
-
Clone the repository
git clone https://github.com/simonorzel26/ngtly.git cd ngtly -
Install dependencies
bun install
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Set up the database
bun ngtly:generate # Generate Prisma client bun ngtly:migrate # Run database migrations bun ngtly:seed # Seed initial data
-
Start development server
bun ngtly:dev
Visit http://localhost:3000 to see the application.
# Development
bun ngtly:dev # Start Next.js development server
bun scraper:dev # Start background scraping services
# Database
bun ngtly:generate # Generate Prisma client
bun ngtly:migrate # Run database migrations
bun ngtly:seed # Seed database with initial data
# Background Services
bun consume:image # Start image processing consumer
bun consume:html # Start HTML processing consumer
bun consume:scraper # Start event scraping consumer
bun consume:request # Start request processing consumer
# Code Quality
bun lint # Lint and format code
bun check # Check code without fixes
# Build
bun ngtly:build # Build for production
bun ngtly:start # Start production serverpackages/ngtly/
βββ src/
β βββ app/ # Next.js App Router pages
β βββ components/ # React components
β βββ lib/ # Utility functions
β βββ styles/ # Global styles
β βββ utils/ # Helper utilities
βββ db/ # Database package
β βββ prisma/ # Database schema and migrations
β βββ index.ts # Database client
βββ public/ # Static assets
The application provides a RESTful API for accessing event data:
GET /api/v1/cities- List all supported citiesGET /api/v1/cities/:name- Get city detailsGET /api/v1/cities/:name/clubs- Get clubs in a cityGET /api/v1/cities/:name/events- Get events in a cityGET /api/v1/events/:id- Get specific event details
API endpoints require Bearer token authentication. Set your API_BEARER_TOKEN environment variable.
Create a .env file with the following variables:
# Database
DATABASE_URL="postgresql://..."
POSTGRES_PRISMA_URL="postgresql://..."
POSTGRES_PRISMA_URL_SCRAPER="postgresql://..."
# Authentication
SECRET="your-secret-key"
API_BEARER_TOKEN="your-api-token"
# External Services
OPENAI_API_KEY="your-openai-key"
RABBIT_MQ_URL="your-rabbitmq-url"
# AWS (for image processing)
AWS_ACCESS_KEY_ID="your-aws-key"
AWS_SECRET_ACCESS_KEY="your-aws-secret"
AWS_REGION="eu-central-1"
AWS_IMAGE_BUCKET="your-bucket-name"
# Stripe (for payments)
STRIPE_SECRET_KEY="your-stripe-secret"
STRIPE_WEBHOOK_SECRET="your-webhook-secret"
# Public URLs
NEXT_PUBLIC_PROD_DOMAIN_URL="https://ngtly.com"
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN="your-mapbox-token"We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
We use Biome for code formatting and linting:
bun lint # Format and lint code
bun check # Check code without formattingNgtly aggregates event data from multiple sources:
- Club Websites: Direct scraping from venue websites
- Event Platforms: Integration with event platforms
- Social Media: Event discovery from social platforms
- User Submissions: Community-contributed events
- All API routes are properly secured with authentication
- Environment variables are validated at runtime
- Database queries are protected against injection
- CORS is configured for cross-origin requests
- Mobile App: Native iOS and Android applications
- Advanced Filtering: More sophisticated event filtering
- User Accounts: Personal event tracking and preferences
- Event Recommendations: AI-powered event suggestions
- Real-time Updates: Live event updates and notifications
- More Cities: Expanding to additional cities worldwide
This project is licensed under the MIT License - see the LICENSE file for details.
- Website: https://ngtly.com
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Built with the T3 Stack
- Powered by Next.js
- Database managed with Prisma
- Styled with Tailwind CSS
