ClubHub is a website designed to centralize school clubs and provide easy management and access for different organizations. Each organization gets their own customizable webpage, featuring:
- Interactive calendar for tracking campus club activities
- Customizable club pages accessible through club user login
- Template-based design for consistent branding
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js
- Database: Firebase Firestore
- Authentication: Firebase Auth
No manual setup required. The database is automatically configured through Firebase API in the firebase.js file.
- Clone the repository to your local machine
- Install dependencies:
npm install
- Start the development server:
npx nodemon server.js
- Open http://localhost:8080 in your web browser
Base URL: https://identitytoolkit.googleapis.com/v1
- Firebase Endpoint:
/accounts:signUp?key=[API_KEY] - Client Usage:
signUp(email, password) - Type: POST
- Description: Creates a new user account with email verification
- Parameters:
- email: String (must end with @etown.edu)
- password: String
- Response: Returns a Promise with user credentials
- Firebase Endpoint:
/accounts:signInWithPassword?key=[API_KEY] - Client Usage:
signIn(email, password) - Type: POST
- Description: Authenticates user with email and password
- Parameters:
- email: String
- password: String
- Response: Returns a Promise with user credentials
- Firebase Endpoint:
/accounts:sendOobCode?key=[API_KEY] - Client Usage:
resetPassword(email) - Type: POST
- Description: Sends password reset email
- Parameters:
- email: String
- Response: Returns a Promise
Base URL: https://firestore.googleapis.com/v1
Project Path: projects/etown-clubhub/databases/(default)/documents
- Collection Path:
/users - Document Path:
/users/{userId} - Client Usage:
createUserProfile(user) - Operations:
- Create/Update Profile: POST/PATCH to
/users/{userId} - Read Profile: GET from
/users/{userId}
- Create/Update Profile: POST/PATCH to
- Collection Path:
/clubs - Document Path:
/clubs/{clubId} - Operations:
- Update Club Verification: PATCH to
/clubs/{clubId} - Read Club Data: GET from
/clubs/{clubId}
- Update Club Verification: PATCH to
- Collection Path:
/publicClubProfiles - Document Path:
/publicClubProfiles/{userId} - Operations:
- Create/Update Profile: POST/PATCH to
/publicClubProfiles/{userId} - Read Profile: GET from
/publicClubProfiles/{userId}
- Create/Update Profile: POST/PATCH to
- Firebase endpoints are handled automatically by the Firebase SDK - no need for direct calls
- Authentication handling is managed through
firebase.auth() - Database operations are managed through
firebase.firestore() - Additional Firebase API calls exist for calendar, messaging, and other features across different files - this documentation covers the core authentication and user management endpoints
- All requests require valid Firebase authentication tokens
- Database access restricted to authenticated users
- Email domain restriction: @etown.edu only
- Role-based access control:
- superadmin
- clubAdmin
- user
Created by © MM Studios for Elizabethtown College Fall 2024 CS 310
