Skip to content

rotoon/CM-EVENTS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

73 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ HYPE CNX

The loudest event feed in the North. Discover events, lifestyle, and unique experiences in Chiang Mai, Thailand.

Next.js React TypeScript TailwindCSS Railway


🌐 Live Demo

https:///hypecnx.com/


✨ Features

Feature Description
πŸ—“οΈ Event Discovery Browse events by month, category, or search
πŸ—ΊοΈ Interactive Map Leaflet-based map with custom Neo-Brutalist markers
🎨 Neo-Brutalist Design Bold, modern UI with striking colors and shadows
πŸ“± Fully Responsive Mobile-first design that works on all devices
πŸ” SEO Optimized Server Components, dynamic metadata, sitemap, robots.txt
β™Ώ Accessible ARIA labels, keyboard navigation support
⚑ Fast React Query caching, infinite scroll, optimized images

πŸ—οΈ Project Structure

CM-EVENTS/
β”œβ”€β”€ frontend/          # Next.js 16 App (React 19)
β”‚   β”œβ”€β”€ app/           # App Router pages
β”‚   β”œβ”€β”€ components/    # Reusable UI components
β”‚   β”œβ”€β”€ hooks/         # React Query hooks
β”‚   β”œβ”€β”€ lib/           # Utilities, types, API client
β”‚   └── public/        # Static assets
β”‚
β”œβ”€β”€ backend/           # Express.js API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ controllers/   # API handlers
β”‚   β”‚   β”œβ”€β”€ services/      # Business logic + Scraper
β”‚   β”‚   β”œβ”€β”€ routes/        # Route definitions
β”‚   β”‚   β”œβ”€β”€ config/        # Database config
β”‚   β”‚   └── utils/         # Helpers
β”‚   └── api/               # Legacy entry point
β”‚
β”œβ”€β”€ docs/               # Documentation
β”‚   β”œβ”€β”€ API.md              # API endpoints
β”‚   β”œβ”€β”€ ARCHITECTURE.md    # System architecture
β”‚   β”œβ”€β”€ DEVELOPMENT.md      # Development guide
β”‚   β”œβ”€β”€ DEPLOYMENT.md      # Deployment instructions
β”‚   └── ENV.md             # Environment variables
β”‚
└── design/            # Design assets & mockups

πŸ› οΈ Tech Stack

Frontend

  • Framework: Next.js 16 (App Router, React 19)
  • Styling: Tailwind CSS 4
  • State: React Query (TanStack Query)
  • Maps: Leaflet + react-leaflet
  • Icons: Lucide React
  • Language: TypeScript 5

Backend

  • Runtime: Node.js + tsx
  • Framework: Express.js 5
  • Database: PostgreSQL (Railway)
  • Scraper: Cheerio + Axios
  • AI: Google Generative AI (for content extraction)

Deployment

  • Platform: Railway
  • Build: Docker (standalone Next.js output)

πŸš€ Getting Started

Prerequisites

  • Node.js 20+
  • pnpm (recommended)
  • PostgreSQL database

Quick Start

For detailed setup instructions, see Development Guide.

Frontend

cd frontend

# Install dependencies
pnpm install

# Set environment variables
echo "NEXT_PUBLIC_API_URL=http://localhost:8000" > .env.local

# Run development server
pnpm dev

# Build for production
pnpm build

# Deploy to Railway
pnpm deploy

Backend

cd backend

# Install dependencies
pnpm install

# Set environment variables
cp .env.example .env
# Edit .env with your database credentials
# See [ENV.md](docs/ENV.md) for all variables

# Run development server
pnpm dev

# Deploy to Railway
pnpm deploy

🌐 API Endpoints

For complete API documentation, see API.md.

Method Endpoint Description
GET /events List events (with pagination, filters)
GET /events/:id Get event by ID with images
GET /months Get available months
GET /categories Get event categories
GET /stats Get event statistics
GET /search?q= Search events
GET /upcoming Get upcoming events
GET /map Get events with GPS coordinates
GET /scrape/status Scraper status

🎨 Design System

Neo-Brutalist Color Palette

Color Hex Usage
Neo Lime #ccff00 Primary accents, CTAs
Neo Pink #ff00ff Highlights, badges
Neo Purple #9d00ff Secondary accents
Neo Black #000000 Text, borders
Neo White #ffffff Backgrounds

Typography

  • Display: Outfit (headings)
  • Sans: Kanit (body text, Thai support)
  • Mono: JetBrains Mono (code, labels)

πŸ“ Key Files

File Description
frontend/app/layout.tsx Root layout with SEO metadata
frontend/components/error-boundary.tsx Error handling component
frontend/lib/api.ts API client functions
frontend/hooks/use-events.ts React Query hooks
backend/src/app.ts Express app setup
backend/src/services/scraper.service.ts Event scraper

πŸ”§ Scripts

Frontend

pnpm dev      # Start development server
pnpm build    # Build for production
pnpm start    # Start production server
pnpm lint     # Run ESLint
pnpm deploy   # Deploy to Railway

Backend

pnpm dev      # Start with hot reload
pnpm start    # Start production server
pnpm deploy   # Deploy to Railway

🚒 Deployment

For detailed deployment instructions, see Deployment Guide.

Both frontend and backend are configured for Railway deployment:

# Frontend
cd frontend && railway up

# Backend
cd backend && railway up

Docker files are included for containerized deployment.


πŸ“š Documentation

Document Description
API Documentation Complete API reference with all endpoints
Architecture System architecture, tech stack, data flow
Development Guide Setup, workflow, best practices
Deployment Guide Railway, Vercel, AWS deployment
Environment Variables All required and optional env vars

πŸ“„ License

MIT Β© 2025 Hype CNX Team


πŸ™ Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors