Skip to content

Latest commit

 

History

36 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Community Compass

Video for SwampHacks Hackathon Demo: Community Compass - Brave 2026-01-25 01-52-44.mp4

Devpost for SwampHacks: https://devpost.com/software/community-compass-rmojbk

A resource finder web application that matches users to community services based on their immediate needs, emotional state ("vibe"), and logistical constraints.

Tech Stack

  • Frontend: React (Vite), Tailwind CSS, Leaflet.js
  • Backend: Python FastAPI
  • AI Integration: Google Gemini API
  • Maps: OpenStreetMap tiles via Leaflet

Features

  • Needs-Based Matching: Find resources for Food, Cash, Social, and Mental Health needs
  • Vibe-Aware Filtering: Filter results based on your current emotional state (Quiet, Social, Drive-thru, Educational, Safe Space)
  • Location-Aware: Uses your location to find nearby resources with distance calculations
  • AI-Powered Insights: Get personalized information about what to expect at each location
  • Interactive Map: Split-screen view with resource list and interactive Leaflet map
  • Mobile Responsive: Works on desktop and mobile devices

Project Structure

SwampHacks_Project/
├── backend/
│   ├── main.py              # FastAPI application
│   ├── requirements.txt     # Python dependencies
│   └── .env.example         # Environment variables template
├── frontend/
│   ├── src/
│   │   ├── components/      # React components
│   │   │   ├── App.jsx
│   │   │   ├── LandingPage.jsx
│   │   │   ├── Questionnaire.jsx
│   │   │   ├── NeedsStep.jsx
│   │   │   ├── FeelingsStep.jsx
│   │   │   ├── LogisticsStep.jsx
│   │   │   ├── ResultsView.jsx
│   │   │   ├── Map.jsx
│   │   │   ├── ResourceList.jsx
│   │   │   └── ResourceDetail.jsx
│   │   ├── main.jsx
│   │   └── index.css
│   ├── package.json
│   ├── vite.config.js
│   ├── tailwind.config.js
│   └── index.html
└── README.md

Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Python 3.9+
  • (Optional) Google Gemini API key for AI insights

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Create a virtual environment:

    python -m venv venv
    
    # On Windows (Command Prompt):
    venv\Scripts\activate
    
    # On Windows (PowerShell):
    venv\Scripts\Activate.ps1
    
    # On Mac/Linux:
    source venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. (Optional) Configure Gemini API:

    # On Windows:
    copy .env.example .env
    
    # On Mac/Linux:
    cp .env.example .env
    
    # Then edit .env and add your GEMINI_API_KEY
  5. Start the backend server:

    uvicorn main:app --reload --port 8000

Frontend Setup

  1. Navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. Open http://localhost:5173 in your browser

API Endpoints

  • GET / - Health check
  • GET /api/resources - Get all resources
  • POST /api/search - Search resources with filters
  • POST /api/generate-insight - Generate AI insight for a resource

Environment Variables

Variable Description Required
GEMINI_API_KEY Google Gemini API key for AI insights No (fallback responses provided)

Resource Categories

Need Resource Types
Food Food Banks, Farmers Markets, Pantries
Cash Plasma Donation Centers, Day Labor
Social Community Centers, Third Places
Mental Health Support Groups, Quiet Parks

Feeling Tags

  • Quiet: Low-stimulation environments
  • Social: Open to connecting with others
  • Drive-thru: Minimal interaction preferred
  • Educational: Learning opportunities
  • Safe Space: Judgment-free environments

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages