CampusLink

A comprehensive platform connecting brands with college event organizers for sponsorship opportunities

Overview

CampusLink is a sophisticated platform designed to bridge the gap between brands seeking marketing opportunities and college event organizers. The platform enables thousands of users across multiple schools to create, discover, and sponsor events, with secure payment processing, real-time messaging, and digital contract management. It serves as a complete ecosystem for campus event sponsorships, benefiting both brands looking to reach college audiences and student organizations seeking funding.

Key Features

  • Brand-to-organizer matching system for event sponsorships
  • Secure payment processing through Stripe integration
  • Real-time chat with digital contract creation and signing
  • Multi-school support with school-specific branding
  • Comprehensive user profiles for brands, students, and organizations
  • OAuth authentication and JWT-based authorization
  • Admin dashboard with detailed analytics and approval workflows

Design & Structure

CampusLink employs a sophisticated architecture with SvelteKit powering the frontend and Cloudflare Workers providing serverless backend capabilities. The platform utilizes JWT-based authentication, role-based access control, and secure WebSocket connections for real-time features. The application leverages Cloudflare D1 (SQLite) for data persistence, with a carefully designed schema that supports complex relationships between users, events, sponsorships, and contracts.

Key Components

  • Sponsorship Marketplace: Connects brands with event organizers
  • Real-time Chat System: Facilitates negotiations between parties
  • Digital Contract System: Enables creation, negotiation, and signing of sponsorship agreements
  • Payment Processing: Secure handling of financial transactions via Stripe
  • Multi-role User Profiles: Specialized interfaces for brands, students, and campus organizations
  • Analytics Dashboard: Comprehensive metrics for both brands and event organizers
  • Approval Workflow: Multi-stage process for event and sponsorship management

Project Structure

The application follows a modular architecture with clear separation of concerns. The frontend is organized into feature-based modules with shared components, while the backend implements a service-oriented approach with dedicated handlers for authentication, payments, messaging, and data operations. This structure ensures maintainability, scalability, and security across the platform.

Example Code

src/routes/[schoolId]/+page.server.js
// Example SvelteKit route handler for CampusLink
export const load = async ({ locals, params }) => {
  const { db } = locals;
  const { schoolId } = params;
  
  // Fetch school data
  const school = await db.prepare(
    'SELECT * FROM schools WHERE id = ?'
  ).bind(schoolId).first();
  
  // Fetch upcoming events for this school
  const events = await db.prepare(
    'SELECT * FROM events WHERE school_id = ? AND start_time > ? ORDER BY start_time'
  ).bind(schoolId, new Date().toISOString()).all();
  
  return {
    school,
    events: events.results
  };
};

Database Schema

CampusLink uses Cloudflare D1, which is a serverless SQL database built on SQLite. The database schema includes tables for schools, events, users, and more.

Database Schema

schools

Stores information about educational institutions

id PK
INTEGER
name
TEXT
short_name
TEXT
primary_color
TEXT
secondary_color
TEXT
city
TEXT

Relationships:

  • events.schoolid
  • student_profiles.schoolid
  • org_profiles.schoolid

users

User accounts with role-based permissions

id PK
INTEGER
email
TEXT
name
TEXT
role
TEXT
is_subscribed
BOOLEAN
created_at
INTEGER
profile_type
TEXT
registration_completed
BOOLEAN
google_id
TEXT
picture
TEXT
stripe_customer_id
TEXT
subscription_status
TEXT
subscription_end_date
INTEGER

Relationships:

  • events.submitted_by_idid
  • brand_profiles.user_idid
  • student_profiles.user_idid
  • org_profiles.user_idid
  • user_contacts.user_idid
  • sponsorship_requests.requester_idid
  • sponsorship_requests.event_host_idid
  • chats.brand_idid
  • chats.host_idid
  • contracts.brand_idid
  • contracts.host_idid

events

Contains event details with approval workflow

id PK
INTEGER
event_name
TEXT
date
TEXT
time
TEXT
description
TEXT
location
TEXT
school FK
INTEGER
organization
TEXT
contact
TEXT
sponsorship_amount
INTEGER
expected_attendance
INTEGER
event_link
TEXT
sponsorship_benefits
TEXT
created_at
INTEGER
approved
INTEGER
submitted_by_id FK
INTEGER

Relationships:

  • schoolschools.id
  • submitted_by_idusers.id
  • sponsorship_requests.event_idid

brand_profiles

Extended profile for brand/company users

id PK
INTEGER
user_id FK
INTEGER
company_name
TEXT
description
TEXT
industry
TEXT
website
TEXT
company_size
TEXT
marketing_budget
DECIMAL(10,2)
target_demographics
TEXT
instagram_handle
TEXT
linkedin_url
TEXT
portfolio_link
TEXT
created_at
INTEGER
updated_at
INTEGER

Relationships:

  • user_idusers.id

student_profiles

Extended profile for student users

id PK
INTEGER
user_id FK
INTEGER
school FK
INTEGER
graduation_year
INTEGER
major
TEXT
bio
TEXT
instagram_handle
TEXT
linkedin_url
TEXT
interests
TEXT
full_name
TEXT
portfolio_link
TEXT
tiktok_handle
TEXT
created_at
INTEGER
updated_at
INTEGER

Relationships:

  • user_idusers.id
  • schoolschools.id

org_profiles

Extended profile for campus organization users

id PK
INTEGER
user_id FK
INTEGER
school FK
INTEGER
org_name
TEXT
bio
TEXT
org_type
TEXT
member_count
INTEGER
instagram_handle
TEXT
website
TEXT
portfolio_link
TEXT
tiktok_handle
TEXT
created_at
INTEGER
updated_at
INTEGER
referred_by
TEXT

Relationships:

  • user_idusers.id
  • schoolschools.id

user_contacts

Contact information for users

id PK
INTEGER
user_id FK
INTEGER
contact_name
TEXT
position
TEXT
email
TEXT
phone
TEXT
is_primary
BOOLEAN
created_at
INTEGER
updated_at
INTEGER

Relationships:

  • user_idusers.id

sponsorship_requests

Tracks sponsorship requests for events

id PK
INTEGER
event_id FK
INTEGER
requester_id FK
INTEGER
event_host_id FK
INTEGER
sponsorship_amount
INTEGER
message
TEXT
status
TEXT
created_at
INTEGER
updated_at
INTEGER

Relationships:

  • event_idevents.id
  • requester_idusers.id
  • event_host_idusers.id

chats

Chat conversations between users

id PK
INTEGER
brand_id FK
INTEGER
host_id FK
INTEGER
messages
TEXT
created_at
INTEGER
updated_at
INTEGER

Relationships:

  • brand_idusers.id
  • host_idusers.id
  • contracts.chat_idid

contracts

Sponsorship contracts between brands and hosts

id PK
INTEGER
chat_id FK
INTEGER
brand_id FK
INTEGER
host_id FK
INTEGER
content
TEXT
payment_amount
INTEGER
payment_link
TEXT
brand_signed_at
INTEGER
host_signed_at
INTEGER
created_at
INTEGER
hidden
BOOLEAN
updated_at
INTEGER

Relationships:

  • chat_idchats.id
  • brand_idusers.id
  • host_idusers.id

Technologies

Frontend

  • SvelteKit 5 with TypeScript and runes
  • TailwindCSS with custom theming for school-specific branding
  • Efficient polling instead of Websockets connections for chat functionality to work serverless
  • PDF generation for contracts and agreements

Backend

  • Cloudflare Workers for serverless functions
  • OAuth 2.0 integration with Google for authentication
  • JWT-based authorization with role-based access control
  • Stripe API integration for payment processing
  • WebCrypto API for secure contract signing

Database

  • Cloudflare D1 (SQLite) with complex relational schema
  • Structured SQL migrations for schema versioning
  • Transaction support for data integrity
  • JSON storage for flexible document structures

Tools

  • Wrangler CLI for Cloudflare development and deployment
  • TypeScript with strict type checking
  • CI/CD pipeline for automated testing and deployment
  • Monitoring and analytics for performance tracking

API Endpoints

Here's a very non-comprehensive list of some of the endpoints from CampusLink:

Authentication

MethodEndpointDescription
POST/authAuthenticate user with Google OAuth
GET/dashboardGet user dashboard data with authentication check

Events

MethodEndpointDescription
GET/admin/eventsList all events with submitter information (admin only)
POST/admin/events?/updateEventUpdate event details (admin only)
POST/admin/events?/toggleApprovalToggle event approval status (admin only)
GET/calendarGet events for calendar view
GET/dashboard/eventsGet events for user dashboard
POST/submitSubmit new event

Chat & Messaging

MethodEndpointDescription
GET/chat/[roomId]Get chat room details and messages
POST/chat/[roomId]?/sendMessageSend message in chat room
POST/chat/api/contracts/generateGenerate contract using AI
POST/chat/api/contracts/analyzeAnalyze contract terms using AI
POST/chat/api/contracts/paymentProcess contract payment

Contracts

MethodEndpointDescription
POST/chat/[roomId]?/createContractCreate new contract in chat room
POST/chat/[roomId]?/updateContractUpdate existing contract
POST/chat/[roomId]?/signContractSign contract by brand or host

Profiles

MethodEndpointDescription
GET/profilesList all profiles
GET/profiles/[id]Get specific profile details
POST/dashboard/profileUpdate user profile

Future Directions

Roadmap

  • Enhanced analytics dashboard for event organizers
  • Integration with social media platforms for event promotion
  • Mobile application development
  • Advanced search and filtering capabilities
  • Event recommendation system based on user preferences

Challenges

  • Scaling to support a large number of schools and events
  • Ensuring data consistency across distributed systems
  • Optimizing performance for real-time updates
  • Implementing robust security measures for user data

Opportunities

  • Expanding to additional educational institutions
  • Developing partnerships with event organizers
  • Creating a marketplace for event services
  • Integrating with existing school management systems

Aditya Agarwal

Full-Stack & Product Engineer but also Marketing, Business Development, Finance

© 2025 Aditya Agarwal. All rights reserved.

This site was mostly vibe coded in a couple hours with about 200k tokens of context.

Welcome to my Portfolio

This site was vibe-coded in a few hours as a place to provide more detail for the projects (and also to test out Roo Code).

It's a somewhat accurate representation of these projects, but there's obviously a lot of detail missing from the LLM's summary.

Feel free to contact me directly, with any questions or comments. Also I apologize, the UI is not up to scratch.