Skip to content

Rahilyw/FlockIn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

75 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Œ FlockIn!! β€” Your Campus Connected

Vite React TypeScript Tailwind CSS Firebase

FlockIn!! is a vibrant campus event discovery platform designed to connect university students with events, clubs, and resources. Inspired by the physical, buzzing corkboard at a student union center, FlockIn!! serves as a tactile digital noticeboard where students can discover what's happening on campus in under 30 seconds.


FlockIn noticeboard

🎨 Visual Identity & Brand Personality

FlockIn!! rejects bland enterprise styling and cold corporate UI in favor of a warm, tactile, and electric experience:

  • The Noticeboard: Events are displayed as paper posters pinned with colorful pushpins (red, yellow, teal) onto a dark green felt board background.
  • Organic Layout: Each card features a slight random tilt (-3deg to +3deg) seeded deterministically by the event ID, giving the board a physical noticeboard feel.
  • Micro-interactions: Hovering over a poster straightens it, lifts it off the board (using smooth scale and shadow transitions), and presents a quick action overlay.
  • Brand Palette: Styled with Terracotta accents, warm pastel blobs for background depth, and bold Montserrat typography.

πŸš€ Key Features

1. Tactile Virtual Noticeboard

  • Masonry Layout: Preserves the natural aspect ratio of each poster.
  • Stable Seeded Rotation: Posters maintain their rotation across re-renders to prevent jarring visual shifts.
  • Fallback Gradients: If an event lacks an image, it auto-generates a gorgeous, deterministic color gradient seeded by the event ID.

2. Multi-Select Hashtag Filters

  • Popularity-Ranked Pills: An interactive tag bar shows active tags ordered dynamically by engagement scores.
  • System Tags: Auto-applied #Today and #Happening Now tags update client-side using helper datetime calculations.
  • Multi-Select Stacking: Stack tags (e.g., #Free + #Social) to narrow down search results instantaneously.

3. Moderation & Safety Pipeline

  • Admin Review Queue: All newly created events go into a pending state and must be reviewed and approved by the admin before appearing on the public noticeboard.
  • Rate Limiting: Users are restricted to a maximum of 3 event posts per day.
  • Flag/Report Flow: Users can report events, which flags them in Firestore for review.
Admin moderation queue

4. Personal Dashboard ("My Space")

  • My Events: Track created events and view their status (Pending Review, Approved, or Rejected).
  • Saved & Going: Track saved bookmarks (πŸ”–) and RSVP responses (βœ…) with count states syncing in real-time.
Personal dashboard My Space

5. Responsive Bottom Tab Bar

  • An adaptive UI layout that transitions the left sidebar into a thumb-friendly bottom tab bar on mobile screens (≀768px).

πŸ›  Tech Stack

  • Frontend: React 18, TypeScript, Vite
  • Styling & Components: Tailwind CSS, shadcn/ui, Radix UI primitives
  • Backend & Database:
    • Firestore: Real-time NoSQL database utilizing aggregate collections and composite indexing.
    • Firebase Authentication: Google Sign-In for secure student logins.
    • Firebase Storage: File hosting with drag-and-drop media uploading.
    • Cloud Functions: Node.js microservices for atomic aggregation transactions.

πŸ“Š System Architecture & Data Flow

graph TD
    User[Student Creator] -->|Uploads Image & Submits| FirestorePending[(Firestore: pending events)]
    FirestorePending -->|Triggers Admin View| Admin[Admin Queue /admin]
    Admin -->|Approve event| FirestoreApproved[(Firestore: approved events)]
    Admin -->|Reject event| FirestoreRejected[(Firestore: rejected events)]
    
    FirestoreApproved -->|Client-side date logic| Noticeboard[Noticeboard View]
    FirestoreApproved -->|Triggers Cloud Function| CloudFunction[Cloud Functions: Update Tag aggregations]
    CloudFunction -->|Write aggregated metrics| FirestoreTags[(Firestore: tags collection)]
    FirestoreTags -->|Read top 8| TagBar[Popularity Tag Pills]
Loading

πŸ’» Getting Started

πŸ“‹ Prerequisites

Ensure you have the following installed:

πŸ“¦ Installation

  1. Clone the Repository

    git clone https://github.com/Rahilyw/FlockIn.git
    cd FlockIn
  2. Install Frontend Dependencies

    npm install
  3. Install Firebase Functions Dependencies

    cd functions
    npm install
    cd ..
  4. Configure Environment Variables Copy .env.example to .env.local and populate it with your Firebase Web App configuration:

    cp .env.example .env.local

    Configure the variables in .env.local:

    VITE_FIREBASE_API_KEY=your-api-key
    VITE_FIREBASE_AUTH_DOMAIN=your-auth-domain
    VITE_FIREBASE_PROJECT_ID=your-project-id
    VITE_FIREBASE_STORAGE_BUCKET=your-storage-bucket
    VITE_FIREBASE_MESSAGING_SENDER_ID=your-sender-id
    VITE_FIREBASE_APP_ID=your-app-id
    VITE_FIREBASE_MEASUREMENT_ID=your-measurement-id
    
    # Gates the /admin route (found in Firebase Auth User List)
    VITE_ADMIN_UID=your-admin-user-uid

βš™οΈ Development & Database Seeding

To make development easier, local seeding scripts are provided to populate your Firestore and Firebase Storage instances.

  • Run Development Server

    npm run dev

    The site will be available at http://localhost:5173.

  • Database Seeding

    • Seed mock events and tags:
      npm run seed
    • Perform a clean seed (clear existing collections first):
      npm run seed:fresh
    • Dry-run poster asset uploading:
      npm run posters:dry
    • Upload actual poster assets to Firebase Storage:
      npm run posters

πŸ”’ Security Rules & Function Deployment

FlockIn!! enforces strict authorization constraints on Firestore and Cloud Storage.

  • Deploy Firestore Security Rules & Indexes

    firebase deploy --only firestore
  • Deploy Cloud Storage Rules

    firebase deploy --only storage
  • Deploy Firebase Cloud Functions

    firebase deploy --only functions

πŸ“‚ Project Structure

FlockIn/
β”œβ”€β”€ .firebase/             # Firebase Local configuration
β”œβ”€β”€ functions/             # Firebase Cloud Functions (TypeScript source)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   └── index.ts       # Document triggers for tag aggregation
β”‚   └── package.json
β”œβ”€β”€ scripts/               # Database seeding and poster generation utilities
β”‚   β”œβ”€β”€ seed.ts
β”‚   └── upload-posters.ts
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Noticeboard/   # Noticeboard wall & Poster Card overlay modules
β”‚   β”‚   β”œβ”€β”€ Dashboard/     # My Space dashboard tabs
β”‚   β”‚   β”œβ”€β”€ Admin/         # Gated Admin review queue
β”‚   β”‚   β”œβ”€β”€ Layout/        # Navbar & BottomTabBar components
β”‚   β”‚   └── ui/            # shadcn UI wrappers
β”‚   β”œβ”€β”€ firebase/          # Firebase config setup & query layers
β”‚   β”œβ”€β”€ hooks/             # Custom React Hooks (auth, admin, events)
β”‚   β”œβ”€β”€ pages/             # App views (Noticeboard, Details, Space, Form)
β”‚   β”œβ”€β”€ types/             # Shared TypeScript models
β”‚   β”œβ”€β”€ App.tsx            # Routes configuration
β”‚   β”œβ”€β”€ index.css          # Theme styles, custom variables & typography
β”‚   └── main.tsx
β”œβ”€β”€ firestore.rules        # Production DB access control
β”œβ”€β”€ storage.rules          # Production Storage access control
β”œβ”€β”€ firebase.json          # Firebase deployment settings
└── package.json

About

A web/mobile platform that recommends campus events, clubs, and resources to students based on their interests and past activity.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors