Skip to content

AlexanderJVP/ase-platform

Repository files navigation

๐ŸŽ‰ Antwerp Student Events (ASE) Platform

A modern, mobile-first web platform for discovering student events in Antwerp. Built with Next.js, React, and Tailwind CSS.

๐Ÿ“‹ Table of Contents

โœจ Features

Current Features

  • โœ… Event Feed - Browse events in a clean, card-based layout
  • โœ… Filtering & Search - Filter by category, date, price, and search by keyword
  • โœ… Event Details - Full event page with date, location, organizer info
  • โœ… Event Submission - Associations can submit events for approval
  • โœ… Admin Panel - Review and approve/reject event submissions
  • โœ… Mobile-First Design - Responsive design optimized for all devices
  • โœ… Modern UI - Clean aesthetic inspired by Apple/Airbnb

Planned Features (Future)

  • ๐Ÿ”„ User authentication & personal accounts
  • ๐Ÿ”„ Save/favorite events for later
  • ๐Ÿ”„ Personal calendar view
  • ๐Ÿ”„ Trending events algorithm
  • ๐Ÿ”„ Map integration (Google Maps)
  • ๐Ÿ”„ Ticket system integration
  • ๐Ÿ”„ Social sharing (comments, ratings)
  • ๐Ÿ”„ Email notifications
  • ๐Ÿ”„ Real-time updates

๐Ÿ› ๏ธ Tech Stack

Category Technology
Frontend Next.js 14+, React 18, TypeScript
Styling Tailwind CSS 3
Backend Next.js API Routes
Database Supabase (PostgreSQL) - Ready to integrate
Authentication Supabase Auth - Ready to integrate
File Storage Supabase Storage - Ready to integrate
Deployment Vercel

๐Ÿ“ Project Structure

ase-platform/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ layout.tsx                 # Root layout
โ”‚   โ”œโ”€โ”€ page.tsx                   # Homepage (event feed)
โ”‚   โ”œโ”€โ”€ events/
โ”‚   โ”‚   โ””โ”€โ”€ [id]/
โ”‚   โ”‚       โ””โ”€โ”€ page.tsx           # Event detail page
โ”‚   โ”œโ”€โ”€ submit/
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx               # Event submission form
โ”‚   โ”œโ”€โ”€ admin/
โ”‚   โ”‚   โ””โ”€โ”€ page.tsx               # Admin panel
โ”‚   โ””โ”€โ”€ api/
โ”‚       โ”œโ”€โ”€ events/
โ”‚       โ”‚   โ”œโ”€โ”€ route.ts           # GET events, POST new event
โ”‚       โ”‚   โ””โ”€โ”€ [id]/route.ts      # GET single event
โ”‚       โ”œโ”€โ”€ submissions/
โ”‚       โ”‚   โ”œโ”€โ”€ route.ts           # GET & POST submissions
โ”‚       โ”‚   โ””โ”€โ”€ [id]/route.ts      # PATCH & DELETE submission
โ”‚       โ””โ”€โ”€ categories/
โ”‚           โ””โ”€โ”€ route.ts           # GET categories
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ EventCard.tsx              # Reusable event card
โ”‚   โ”œโ”€โ”€ EventGrid.tsx              # Grid layout for events
โ”‚   โ”œโ”€โ”€ EventDetail.tsx            # Detailed event view
โ”‚   โ”œโ”€โ”€ FilterBar.tsx              # Filters & search
โ”‚   โ”œโ”€โ”€ SubmissionForm.tsx         # Event submission form
โ”‚   โ”œโ”€โ”€ AdminTable.tsx             # Admin submissions table
โ”‚   โ”œโ”€โ”€ Header.tsx                 # Navigation header
โ”‚   โ””โ”€โ”€ Footer.tsx                 # Footer
โ”œโ”€โ”€ lib/
โ”‚   โ”œโ”€โ”€ types.ts                   # TypeScript type definitions
โ”‚   โ”œโ”€โ”€ constants.ts               # Constants & categories
โ”‚   โ”œโ”€โ”€ api.ts                     # API client functions
โ”‚   โ””โ”€โ”€ supabase.ts                # Supabase client *
โ”œโ”€โ”€ styles/
โ”‚   โ””โ”€โ”€ globals.css                # Global styles & utilities
โ”œโ”€โ”€ public/                        # Static assets
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tailwind.config.js
โ”œโ”€โ”€ next.config.js
โ””โ”€โ”€ tsconfig.json

*Ready for Supabase integration

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+ (recommended 20+)
  • npm or yarn
  • Git

Installation

  1. Clone or set up the project:
cd ase-platform
npm install
  1. Set up environment variables:
cp .env.local.example .env.local

Edit .env.local and add:

# Supabase (optional - mock data works for now)
NEXT_PUBLIC_SUPABASE_URL=your_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_key
SUPABASE_SERVICE_ROLE_KEY=your_role_key

# Admin
ADMIN_PASSWORD=your_secure_password
  1. Run the development server:
npm run dev

Open http://localhost:3000 in your browser.

Development Scripts

# Start development server
npm run dev

# Build for production
npm run build

# Start production server
npm start

# Run TypeScript type checking
npm run type-check

# Run linter
npm run lint

๐Ÿ’พ Database Setup

Using Supabase (Recommended)

  1. Create a Supabase Project:

    • Go to supabase.com
    • Click "New Project"
    • Fill in project details and create
  2. Create Tables:

Copy and run these SQL queries in Supabase SQL Editor:

-- Events Table
CREATE TABLE events (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  title TEXT NOT NULL,
  description TEXT,
  image_url TEXT,
  category TEXT NOT NULL,
  date TIMESTAMP NOT NULL,
  location TEXT NOT NULL,
  price DECIMAL(10,2),
  organizer TEXT NOT NULL,
  organizer_instagram TEXT,
  ticket_url TEXT,
  created_at TIMESTAMP DEFAULT now(),
  updated_at TIMESTAMP DEFAULT now(),
  status TEXT DEFAULT 'published',
  CONSTRAINT status_check CHECK (status IN ('published', 'draft', 'archived'))
);

-- Submissions Table
CREATE TABLE submissions (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  event_id UUID REFERENCES events(id) ON DELETE SET NULL,
  title TEXT NOT NULL,
  description TEXT,
  image_url TEXT,
  category TEXT NOT NULL,
  date TIMESTAMP NOT NULL,
  location TEXT NOT NULL,
  price DECIMAL(10,2),
  organizer TEXT NOT NULL,
  organizer_contact TEXT NOT NULL,
  organizer_instagram TEXT,
  ticket_url TEXT,
  status TEXT DEFAULT 'pending',
  admin_notes TEXT,
  created_at TIMESTAMP DEFAULT now(),
  CONSTRAINT status_check CHECK (status IN ('pending', 'approved', 'rejected'))
);

-- Categories Table
CREATE TABLE categories (
  id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
  name TEXT NOT NULL UNIQUE,
  icon TEXT,
  color TEXT
);

-- Indexes
CREATE INDEX idx_events_category ON events(category);
CREATE INDEX idx_events_date ON events(date);
CREATE INDEX idx_events_status ON events(status);
CREATE INDEX idx_submissions_status ON submissions(status);
CREATE INDEX idx_submissions_date ON submissions(date);

-- Enable Row Level Security (RLS)
ALTER TABLE events ENABLE ROW LEVEL SECURITY;
ALTER TABLE submissions ENABLE ROW LEVEL SECURITY;

-- Public can read published events
CREATE POLICY "Public read published events" ON events
  FOR SELECT USING (status = 'published');

-- Only admins can read submissions (add auth later)
-- For now, submissions are protected by password
  1. Update Environment Variables:
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
  1. Initialize Supabase in Code:

The project has lib/supabase.ts ready. Just uncomment and use it in API routes:

import { supabase, supabaseAdmin } from '@/lib/supabase'

// Fetch events
const { data, error } = await supabase
  .from('events')
  .select('*')
  .eq('status', 'published')

๐Ÿ”Œ API Reference

Events

GET /api/events - Fetch events with filters

curl "http://localhost:3000/api/events?category=party&priceRange=free&dateRange=week"

Query Parameters:

  • category - Filter by category (party, sports, culture, etc.)
  • dateRange - today, week, month, upcoming
  • priceRange - free, paid, all
  • search - Search by title, description, location

Response:

{
  "success": true,
  "data": [...],
  "total": 10,
  "page": 1,
  "pageSize": 10
}

GET /api/events/:id - Fetch single event

curl "http://localhost:3000/api/events/event-id"

Submissions

POST /api/submissions - Submit new event

curl -X POST http://localhost:3000/api/submissions \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Event Title",
    "description": "Description",
    "category": "party",
    "date": "2024-12-25T20:00:00Z",
    "location": "Antwerp",
    "price": 5,
    "organizer": "My Association",
    "organizerContact": "email@example.com"
  }'

GET /api/submissions - Get pending submissions (admin only)

curl -H "Authorization: Bearer admin_password" \
  http://localhost:3000/api/submissions

PATCH /api/submissions/:id - Approve/reject submission

curl -X PATCH http://localhost:3000/api/submissions/sub-id \
  -H "Authorization: Bearer admin_password" \
  -H "Content-Type: application/json" \
  -d '{"status": "approved"}'

๐ŸŽจ Design System

Colors

  • Primary: #0066FF (Bright Blue)
  • Secondary: #FF6B6B (Coral)
  • Background: #FAFAFA (Off-white)
  • Text: #1a1a1a (Dark)
  • Border: #E0E0E0 (Light Gray)

Typography

  • Font: Inter (sans-serif)
  • Sizes: 12px, 14px, 16px, 18px, 24px, 32px
  • Weights: 400 (Regular), 500 (Medium), 600 (Semibold), 700 (Bold)

Components

  • Cards with soft shadows and rounded corners
  • Smooth transitions and hover effects
  • Responsive grid layouts
  • Mobile-first design

๐Ÿš€ Deployment

Deploy to Vercel (Recommended)

  1. Push to GitHub:
git init
git add .
git commit -m "Initial commit"
git push origin main
  1. Deploy on Vercel:
    • Go to vercel.com
    • Click "New Project"
    • Import the GitHub repository
    • Add environment variables
    • Click "Deploy"

Manual Deployment

# Build
npm run build

# Start production server
npm start

๐Ÿ”ฎ Future Enhancements

Phase 2: Authentication & Users

  • User registration/login
  • User profiles
  • Save/favorite events
  • Personal calendar

Phase 3: Social & Engagement

  • Event comments and ratings
  • User-to-user messaging
  • Social sharing integration
  • Trending events algorithm

Phase 4: Admin & Analytics

  • Advanced admin dashboard
  • Event statistics
  • Email notifications
  • Email verification for submissions

Phase 5: Advanced Features

  • Google Maps integration
  • Real-time notifications (WebSockets)
  • Ticketing system
  • Multi-language support
  • Dark mode

Phase 6: Mobile App

  • React Native mobile app
  • Push notifications
  • Offline support

๐Ÿ“ API Integration Guide

To connect this to Supabase, follow these steps in each API route:

// Before (Mock)
const mockEvents = [...]
return mockEvents

// After (Supabase)
import { supabase } from '@/lib/supabase'

const { data, error } = await supabase
  .from('events')
  .select('*')
  .eq('status', 'published')
  .order('date', { ascending: true })

if (error) throw error
return data

๐Ÿค Contributing

This is a demonstration project. To extend it:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is open source and available under the MIT License.

๐Ÿ“ž Support

For questions or issues:


Made with ๐Ÿ’™ for Antwerp Students

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors