Skip to content

code-like-crazy/eve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Eve - Your Personal Campus Beacon

A friendly digital companion that acts as a personal light in the dark, ensuring every student on campus feels connected and safe during any walk, day or night.

🌟 About Eve

Eve transforms campus safety through community connection rather than fear. Built as a Progressive Web App, it provides three core safety features that work together to create a comprehensive campus safety network.

Core Features

🀝 Buddy System
Connect with trusted friends who can track your walks in real-time. Choose a buddy from your crew, and they'll see your "light" moving safely across the map until you reach your destination.

πŸ€– AI Guardian
Smart monitoring that acts as your automated safety companion. If you stop moving unexpectedly during a walk, the AI Guardian gently checks in with you and can alert your buddy if needed.

πŸ—ΊοΈ Community Glow Map
A living map powered by community insights. Drop "Glow" pins for well-lit, safe areas and "Heads-up" pins for areas that need attention. See real-time safety information from your campus community.

✨ Features

  • πŸ” Secure Authentication - Sign in with Google or Discord
  • πŸ“± Mobile-First Design - Optimized for on-the-go campus use
  • πŸ—ΊοΈ Google Maps Integration - Real-time location tracking and route planning
  • πŸ‘₯ Buddy Management - Add friends, manage availability, and coordinate safety
  • 🚢 Guided Walks - Start tracked walks with destination and buddy selection
  • πŸ“ Community Pins - Share and discover safety insights across campus
  • 🚨 Emergency Alerts - One-tap emergency button with instant buddy notification
  • πŸ’¬ Real-time Communication - Live updates and notifications via WebSockets
  • πŸ“± PWA Support - Install as a native app on any device
  • πŸŒ™ Smart Monitoring - AI-powered movement analysis and check-ins

πŸ› οΈ Tech Stack

  • Framework: Next.js 15 with App Router
  • Authentication: NextAuth v5 (AuthJS) with OAuth providers
  • Database: PostgreSQL via NeonDB with Drizzle ORM
  • Maps: Google Maps JavaScript API
  • Real-time: WebSockets for live tracking and notifications
  • UI: Shadcn/ui components with Tailwind CSS
  • PWA: Service Workers with offline support
  • AI: Smart monitoring and automated check-ins
  • Language: TypeScript with full type safety

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • Bun (recommended) or npm
  • PostgreSQL database (NeonDB recommended)
  • Google Cloud Console account (for Maps API)

1. Environment Setup

Create a .env.local file with the following variables:

# Database
DATABASE_URL="postgresql://username:password@host/database"

# NextAuth
NEXTAUTH_SECRET="your-secret-key-here"
NEXTAUTH_URL="https://eve.codelikecrazy.dev"

# Google OAuth
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"

# Discord OAuth
DISCORD_CLIENT_ID="your-discord-client-id"
DISCORD_CLIENT_SECRET="your-discord-client-secret"

# Google Maps
NEXT_PUBLIC_GOOGLE_MAPS_API_KEY="your-google-maps-api-key"

# AI Service (Optional)
OPENAI_API_KEY="your-openai-api-key"

2. OAuth Provider Setup

Google OAuth

  1. Go to Google Cloud Console
  2. Create/select project and enable Google+ API
  3. Create OAuth 2.0 credentials
  4. Add redirect URI: https://eve.codelikecrazy.dev/api/auth/callback/google

Discord OAuth

  1. Go to Discord Developer Portal
  2. Create new application
  3. Add redirect URI: https://eve.codelikecrazy.dev/api/auth/callback/discord

3. Google Maps Setup

  1. In Google Cloud Console, enable Maps JavaScript API
  2. Create API key and restrict to your domain
  3. Add the key to NEXT_PUBLIC_GOOGLE_MAPS_API_KEY

4. Database Setup

NeonDB Setup

  1. Sign up at Neon
  2. Create new database
  3. Copy connection string to DATABASE_URL

Initialize Database

bun run db:push

5. Install & Run

# Install dependencies
bun install

# Start development server
bun dev

Visit https://eve.codelikecrazy.dev to start using Eve!

πŸ“œ Available Scripts

# Development
bun dev                 # Start development server
bun build              # Build for production
bun start              # Start production server

# Code Quality
bun lint               # Run ESLint
bun format             # Format with Prettier
bun format:check       # Check formatting

# Database
bun db:generate        # Generate migrations
bun db:migrate         # Run migrations
bun db:push           # Push schema changes
bun db:studio         # Open Drizzle Studio

πŸ“± How to Use Eve

Getting Started

  1. Sign Up: Create account with Google or Discord
  2. Add Buddies: Invite trusted friends to your safety crew
  3. Set Availability: Toggle when you're available to be a buddy

Starting a Guided Walk

  1. Open Eve and tap "Start Walk"
  2. Set Destination by tapping the map or entering an address
  3. Choose Buddy from your available crew members
  4. Start Walking - your buddy will see your live location
  5. Arrive Safely - automatic check-in when you reach your destination

Being a Buddy

  1. Get Notified when a friend starts a walk
  2. Track Progress on the live map
  3. Receive Alerts if the AI Guardian detects issues
  4. Stay Connected until your friend arrives safely

Using Community Features

  1. View Glow Map to see community safety insights
  2. Add Pins after walks to share your experience
  3. Plan Routes using community-recommended paths
  4. Stay Informed about campus safety trends

Emergency Features

  1. Emergency Button - Large red button for instant alerts
  2. Auto-Location Sharing - Sends precise location to your buddy
  3. Escalation Options - Can contact campus security if configured

πŸ“ Project Structure

web/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (landing)/              # Public landing page
β”‚   β”œβ”€β”€ (auth)/                 # Authentication pages
β”‚   β”œβ”€β”€ (dashboard)/            # Main application
β”‚   β”‚   β”œβ”€β”€ dashboard/          # Dashboard home
β”‚   β”‚   β”‚   β”œβ”€β”€ buddies/        # Buddy management
β”‚   β”‚   β”‚   β”œβ”€β”€ walk/           # Walk features
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ start/      # Start new walk
β”‚   β”‚   β”‚   β”‚   └── [id]/       # Active walk tracking
β”‚   β”‚   β”‚   └── map/            # Community map
β”‚   β”‚   └── layout.tsx          # App navigation
β”‚   β”œβ”€β”€ api/                    # API routes
β”‚   β”‚   β”œβ”€β”€ auth/               # NextAuth endpoints
β”‚   β”‚   β”œβ”€β”€ walks/              # Walk management
β”‚   β”‚   β”œβ”€β”€ buddies/            # Buddy system
β”‚   β”‚   └── pins/               # Community pins
β”‚   └── globals.css             # Design system
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ auth/                   # Authentication UI
β”‚   β”œβ”€β”€ walk/                   # Walk tracking components
β”‚   β”œβ”€β”€ map/                    # Google Maps integration
β”‚   β”œβ”€β”€ buddy/                  # Buddy system UI
β”‚   └── ui/                     # Reusable UI components
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ auth.ts                 # Authentication config
β”‚   β”œβ”€β”€ maps.ts                 # Google Maps utilities
β”‚   └── websocket.ts            # Real-time communication
β”œβ”€β”€ server/
β”‚   β”œβ”€β”€ db/                     # Database layer
β”‚   β”œβ”€β”€ services/               # Business logic
β”‚   └── websocket/              # WebSocket server
└── middleware.ts               # Route protection

πŸ”’ Privacy & Security

  • Location Data: Encrypted in transit, automatically deleted after walks
  • Buddy Permissions: Users control exactly who can track them when
  • Emergency Override: Emergency features can override privacy settings
  • Data Retention: Minimal data storage with automatic cleanup
  • GDPR Compliant: Full user control over personal data

🌍 Campus Deployment

Eve is designed to scale across university campuses:

  • Multi-tenant Architecture: Supports multiple campuses
  • Campus-specific Maps: Customized for each campus layout
  • Integration Ready: Can connect with campus security systems
  • Analytics Dashboard: Campus administrators can view safety trends
  • Customizable Features: Adapt to specific campus needs

🀝 Contributing

Eve is built with campus safety in mind. We welcome contributions that enhance student safety through technology and community connection.

πŸ“„ License

This project is focused on campus safety innovation and community building.


Built with ❀️ for campus safety and community connection

About

Best Social Cause @ Hack404 πŸ†

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •