Skip to content

DuckBugging-prosusHackathon/server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server API

A REST API backend server that powers the sports matchmaking platform. It handles user authentication, profiles, calendar integration, match scheduling, and social features.

What It Does

The server provides API endpoints for:

  1. Authentication: User signup, login, and token verification
  2. User Profiles: Create, update, and manage user profiles with location data
  3. Calendar Integration: Connect Google Calendar, fetch schedules, and manage availability
  4. Matches: Create, retrieve, update, and delete scheduled sports matches
  5. Fields: Manage sports field/venue information
  6. Posts: Social feed posts with likes, auto-generated from completed matches
  7. Push Notifications: Register devices, send notifications, and handle question prompts

API Modules

  • /api/auth - Authentication endpoints
  • /api/profile - User profile management
  • /api/calendar - Google Calendar integration and availability
  • /api/matches - Match scheduling and management
  • /api/fields - Sports field/venue data
  • /api/posts - Social feed posts
  • /api/push - Push notification services

Running the Server

# Development mode
npm run dev

# Production mode
npm run build
npm start

The server runs on port 3000 by default (configurable via PORT environment variable).

Requirements

  • Node.js
  • MongoDB database
  • Firebase Admin SDK (for push notifications)
  • Google OAuth credentials (for calendar integration)

Environment Variables

  • MONGODB_URI: MongoDB connection string
  • PORT: Server port (default: 3000)
  • JWT_SECRET: Secret key for JWT tokens
  • FIREBASE_PROJECT_ID: Firebase project ID
  • GOOGLE_CLIENT_ID: Google OAuth client ID
  • GOOGLE_CLIENT_SECRET: Google OAuth client secret

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors