Project Info
This project did not submit a demo video on Devpost.
Empowering immigrants and communities with knowledge, voice, and protection. Overview Juno is a tool designed to help individuals, especially immigrants, understand and assert their rights when interacting with law enforcement or local authorities. The system allows users to: Access legal rights based on state,and federal laws Get guidance on how to navigate future interactions Why We Built This Many community members—especially immigrants—feel vulnerable during encounters with authorities due to language gaps, legal uncertainty, or fear. Juno empowers users with knowledge, emotional support, and a practical toolset to protect their rights. Key Features Location-based rights lookup for personalized legal insight Conversational AI that helps users feel prepared and informed Privacy and Security Security is a core principle of Juno. We prioritize: Transparent data use policies Local or consent-based data storage Status This project is being developed as part of the UC Berkeley AI Hackathon—rapid prototyping in progress! Built with care by a team passionate about justice, tech, and community resilience.
Juno Legal AI Assistant
A legal AI assistant powered by GROQ LLM with advanced session memory capabilities.
Features
🤖 AI-Powered Legal Assistance
- Legal reasoning based on U.S. federal and state law
- Location-aware legal advice
- Voice input and text-to-speech capabilities
- Real-time transcription
💾 Session Memory System
- Persistent Conversations: Each chat session maintains conversation history
- Context Awareness: AI remembers previous questions and provides contextual responses
- Session Management: Create, switch between, and delete multiple chat sessions
- Automatic Cleanup: Sessions expire after 24 hours to manage memory
- Session Limits: Maximum 100 active sessions to prevent memory issues
📍 Location-Based Legal Advice
- Automatic location detection using GPS
- Manual location selection for all U.S. states
- Legal advice tailored to your specific state and city laws
🎤 Voice Features
- Voice-to-text transcription for hands-free interaction
- Text-to-speech for AI responses
- Support for multiple voice input methods
Session Memory Features
Backend Session Management
- Session Creation: Automatic session creation for new conversations
- Conversation History: Stores all messages with timestamps
- Context Window: Uses last 6 messages for context in legal reasoning
- Session APIs:
POST /api/sessions/new- Create new sessionGET /api/sessions/{id}- Get session detailsDELETE /api/sessions/{id}- Delete sessionGET /api/sessions- List all sessionsGET /api/health- Health check with session count
Frontend Session Interface
- Session Panel: Toggle to show/hide session management
- Session List: View all active sessions with creation dates and message counts
- Session Switching: Click any session to load its conversation history
- Session Deletion: Remove sessions with one click
- Active Session Indicator: Shows current session ID and message count
Setup
Backend Setup
cd CalHacks2025/backend
pip install -r requirements.txt
python main.py
Frontend Setup
cd CalHacks2025/frontend
npm install
npm run dev
Environment Variables
Create a .env file in the backend directory:
GROQ_API_KEY=your_groq_api_key_here
GOOGLE_API_KEY=your_google_api_key_here
Usage
- Enable Location: Allow location access or manually select your state
- Start Chatting: Ask legal questions and get AI-powered responses
- Manage Sessions:
- Click "Show Sessions" to view all conversations
- Click "New Session" to start fresh
- Click any session to switch to it
- Click "×" to delete a session
- Voice Input: Use the microphone button for hands-free interaction
Technical Details
Session Storage
- In-memory storage for fast access
- Automatic cleanup after 24 hours of inactivity
- Maximum 100 sessions to prevent memory overflow
- Session data includes:
- Unique session ID
- Creation timestamp
- Last activity timestamp
- Complete conversation history
Context Management
- Last 6 messages used for context in legal reasoning
- Maintains conversation flow and continuity
- Preserves legal context across multiple questions
Memory Optimization
- Automatic session cleanup
- Configurable session limits
- Efficient message storage
- Health monitoring endpoints
API Endpoints
Legal Assistance
POST /legal-response- Main legal advice endpoint with session supportPOST /transcribe- Audio transcriptionPOST /speak- Text-to-speech conversionPOST /location- Location detection
Session Management
POST /api/sessions/new- Create new sessionGET /api/sessions/{session_id}- Get session detailsDELETE /api/sessions/{session_id}- Delete sessionGET /api/sessions- List all sessionsGET /api/health- Health check
Legal Disclaimer
This AI assistant provides general legal information and should not be considered as legal advice. For specific legal matters, please consult with a qualified attorney.
Analysis
View
Metric
- 17
- 16
- 2
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- CSSIn code
- FastAPIIn code
- HTMLIn code
- JavaScriptIn code
- PythonIn code
- ReactIn code
- Tailwind CSSIn code
- TypeScriptIn code
8 of 8 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
212 KB
Source files
72
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
briancontreras/JunoAi-CalHacks2025
84 files · 707 KB · @ ce73fb7
Structure
Interface
55 files · 65%Screens, components and styles rendered to the user.
Application logic
14 files · 17%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript88%
- Python6%
- Markdown3%
- CSS1%
- JavaScript0%
- HTML0%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
frontend/package.json
npm · 67- @hookform/resolvers
- @radix-ui/react-accordion
- @radix-ui/react-alert-dialog
- @radix-ui/react-aspect-ratio
- @radix-ui/react-avatar
- @radix-ui/react-checkbox
- @radix-ui/react-collapsible
- @radix-ui/react-context-menu
- @radix-ui/react-dialog
- @radix-ui/react-dropdown-menu
- @radix-ui/react-hover-card
- @radix-ui/react-label
- @radix-ui/react-menubar
- @radix-ui/react-navigation-menu
- @radix-ui/react-popover
- @radix-ui/react-progress
- @radix-ui/react-radio-group
- @radix-ui/react-scroll-area
- +49 more
backend/requirements.txt
pypi · 44- annotated-types
- anyio
- beautifulsoup4
- cachetools
- certifi
- charset-normalizer
- click
- colorama
- distro
- exceptiongroup
- fastapi
- geographiclib
- geopy
- google-api-core
- google-auth
- google-cloud-texttospeech
- googleapis-common-protos
- +26 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.