{"id":25735445,"url":"https://github.com/yogesh-bhandare/lawbook-api","last_synced_at":"2026-04-12T09:09:28.248Z","repository":{"id":279017425,"uuid":"937084019","full_name":"yogesh-bhandare/lawbook-api","owner":"yogesh-bhandare","description":"Backend API for Lawbook, built with FastAPI, powering virtual moot courts and AI-driven legal tools. Integrates LLMs (OpenAI), Redis, Vector DB, Rate Limiting and AWS","archived":false,"fork":false,"pushed_at":"2025-02-23T07:13:17.000Z","size":1452,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T08:21:23.028Z","etag":null,"topics":["celery","fastapi","getstream-io","llms","rag","rate-limiting","redis","selenium","vector-database"],"latest_commit_sha":null,"homepage":"https://lawbook-app.vercel.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yogesh-bhandare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-22T09:46:07.000Z","updated_at":"2025-02-23T07:13:21.000Z","dependencies_parsed_at":"2025-02-23T08:31:49.469Z","dependency_job_id":null,"html_url":"https://github.com/yogesh-bhandare/lawbook-api","commit_stats":null,"previous_names":["yogesh-bhandare/lawbook-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogesh-bhandare%2Flawbook-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogesh-bhandare%2Flawbook-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogesh-bhandare%2Flawbook-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yogesh-bhandare%2Flawbook-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yogesh-bhandare","download_url":"https://codeload.github.com/yogesh-bhandare/lawbook-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240796196,"owners_count":19858972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celery","fastapi","getstream-io","llms","rag","rate-limiting","redis","selenium","vector-database"],"created_at":"2025-02-26T05:22:54.318Z","updated_at":"2026-04-12T09:09:28.212Z","avatar_url":"https://github.com/yogesh-bhandare.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lawbook Backend API\n\nThis repository contains the backend API for the Lawbook mobile app, a platform redefining legal practice for students. Built on FastAPI, this backend powers the virtual moot court, AI-driven features, and data management, seamlessly integrating with the React Native frontend.\n\n### Overview\n\nLawbook is a cross-platform mobile app designed to revolutionize how law students practice and prepare for trials. By providing a virtual moot court, AI-driven tools, and an extensive case library, Lawbook enables students to refine their legal skills, gain confidence in courtroom proceedings, and excel in their academic and professional pursuits.\n\n### Motivation\n\nPreparing for trials and judgments is often limited to theoretical knowledge or traditional moot court setups. Lawbook bridges this gap by offering a realistic, interactive platform for law students to practice, collaborate, and learn in a virtual environment. The app fosters critical thinking and analytical skills, helping students navigate the complexities of legal practice with ease.\n\n![Lawbook Mockup](md-assets/images/mockup-1.png)\n\n### Features\n   - **Virtual Moot Court:** Simulate real-life trials via video chat with an AI judge or real participants as judges and opponents.\n   - **Document Presentation:** Present, share, and annotate documents during virtual courtroom sessions.\n   - **AI Summarized Case Library:** Access a vast repository of cases and judgments, summarized using advanced AI tools.\n   - **Progress Tracking:** Monitor skill development with milestone-based badges and detailed performance analytics.\n\n### Tech Stack\n\n- **[FastAPI](https://fastapi.tiangolo.com/)** (`pip install \"fastapi[all]\"`) - High-performance web framework for building APIs.\n- **[LLMs (e.g., OpenAI)](https://openai.com)** - Flexible integration with any LLM, powered by LangChain and LangServe for AI-driven features.\n- **[Redis](https://redis.io)** - Used with Celery for rate limiting, task queuing, and caching.\n- **[Celery](https://docs.celeryproject.org)** - Asynchronous task processing for background jobs.\n- **[Vector DB](https://www.pinecone.io/)** - Embedding-based comparison for case similarity and search (e.g., Pinecone or similar).\n- **[PostgreSQL](https://www.postgresql.org/)** - Relational database for user data, case metadata, and other storage needs.\n- **[AWS](https://aws.amazon.com)** - Deployment infrastructure with ECS/EC2 and S3 for file storage.\n- **[GetStream](https://getstream.io/)** - Token generation logic for video/chat integration with the frontend.\n- **[Python 3.11](https://www.python.org)** - Core programming language.\n- **React Native Frontend** - See [Lawbook Frontend repo](https://github.com/yogesh-bhandare/Lawbook) for the client-side codebase.\n\n## Getting Started\n\n### Prerequisites\n\nDownload and install the following tools:\n- **[Git](https://git-scm.com/)** - Version control system.\n- **[VSCode](https://code.visualstudio.com/)** (or **[Cursor](https://cursor.com/)**) - Recommended IDEs.\n- **[Python](https://www.python.org/downloads/)** - Ensure Python 3.11 is installed.\n- **[PostgreSQL](https://www.postgresql.org/download/)** - Local database setup (or use Neon DB).\n- **[Redis](https://redis.io/download)** - For rate limiting and task queuing.\n\n### Setup Instructions\n\n1. **Clone the Repository**\n   ```bash\n   mkdir -p ~/dev/lawbook-backend\n   cd ~/dev/lawbook-backend\n   git clone https://github.com/yogesh-bhandare/lawbook-api .\n   ```\n\n2. **Create a Python Virtual Environment**\n   * **macOS/Linux/WSL:**\n   ```bash\n   python3.11 -m venv venv\n   source venv/bin/activate\n   ```\n   * **Windows (PowerShell):**\n   ```powershell\n   c:\\Path\\To\\Python311\\python.exe -m venv venv\n   .\\venv\\Scripts\\activate\n   ```\n\n3. **Install Requirements**\n   ```bash\n   (venv) python -m pip install --upgrade pip\n   (venv) python -m pip install -r requirements.txt\n   ```\n\n4. **Set Up Environment Variables**\n   Create a `.env` file with keys:\n   - OpenAI API key\n   - Redis URL\n   - PostgreSQL credentials\n   - AWS keys\n   - GetStream secrets\n\n5. **Run the Server**\n   ```bash\n   (venv) uvicorn main:app --reload\n   ```\n\n### Running App\nDownload and use the Lawbook app to explore its features: [Download Lawbook App](https://lawbook-apk.s3.us-east-1.amazonaws.com/download/Lawbook.apk)\n\n![Lawbook Mockup](md-assets/images/mockup-2.png)\n\n### License\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\nFor the frontend codebase, visit [Lawbook Frontend](https://github.com/yogesh-bhandare/Lawbook).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyogesh-bhandare%2Flawbook-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyogesh-bhandare%2Flawbook-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyogesh-bhandare%2Flawbook-api/lists"}