Skip to content

h3ro-dev/lawyerofone

Repository files navigation

LawyerOfOne πŸ›οΈβš–οΈ

AI-powered legal assistant platform built with modern web technologies. LawyerOfOne democratizes legal assistance by providing intelligent document analysis, case management, and AI-driven legal guidance.

LawyerOfOne TypeScript Next.js License

πŸš€ Features

  • AI Legal Assistant: Powered by GPT-4 for intelligent legal guidance
  • Document Analysis: Automated contract review and risk assessment
  • Case Management: Organize and track legal matters efficiently
  • Secure Document Storage: End-to-end encrypted document management
  • Multi-language Support: Available in English, Spanish, and French
  • Real-time Collaboration: Work with legal professionals seamlessly
  • Payment Integration: Stripe-powered billing and subscriptions

πŸ—οΈ Tech Stack

Frontend

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Design System with Utlyze Blue (#4169E1)
  • State Management: Zustand
  • UI Components: React with custom design system
  • Authentication: Supabase Auth

Backend

  • Runtime: Node.js with Express
  • Language: TypeScript
  • Database: PostgreSQL with Prisma ORM
  • Cache: Redis
  • AI Integration: OpenAI GPT-4
  • File Storage: AWS S3 / Cloudflare R2
  • Payment Processing: Stripe

Infrastructure

  • Container: Docker & Docker Compose
  • CI/CD: GitHub Actions
  • Monitoring: Sentry
  • Analytics: PostHog
  • Deployment: Vercel (Frontend) / AWS ECS (Backend)

πŸ“ Project Structure

lawyerofone/
β”œβ”€β”€ frontend/               # Next.js frontend application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/           # App router pages
β”‚   β”‚   β”œβ”€β”€ components/    # React components
β”‚   β”‚   β”œβ”€β”€ styles/        # Design system & global styles
β”‚   β”‚   β”œβ”€β”€ hooks/         # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ utils/         # Utility functions
β”‚   β”‚   └── types/         # TypeScript type definitions
β”‚   └── public/            # Static assets
β”œβ”€β”€ backend/               # Express API server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/          # API routes
β”‚   β”‚   β”œβ”€β”€ models/       # Database models
β”‚   β”‚   β”œβ”€β”€ services/     # Business logic
β”‚   β”‚   β”œβ”€β”€ middleware/   # Express middleware
β”‚   β”‚   └── utils/        # Helper functions
β”‚   └── prisma/           # Database schema
β”œβ”€β”€ docs/                 # Documentation
β”œβ”€β”€ scripts/              # Utility scripts
└── docker-compose.yml    # Local development setup

πŸš€ Quick Start

Prerequisites

  • Node.js 20+
  • Docker & Docker Compose
  • PostgreSQL 16+
  • Redis 7+

Environment Setup

  1. Clone the repository:
git clone https://github.com/yourusername/lawyerofone.git
cd lawyerofone
  1. Copy environment variables:
cp .env.example .env
  1. Update .env with your configuration:
  • Database credentials
  • API keys (OpenAI, Stripe, Supabase)
  • JWT secrets

Development with Docker

# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down

Manual Setup

Backend

cd backend
npm install
npx prisma migrate dev
npm run dev

Frontend

cd frontend
npm install
npm run dev

Access the application:

πŸ§ͺ Testing

Backend Tests

cd backend
npm test                 # Run all tests
npm run test:watch      # Watch mode
npm run test:coverage   # Coverage report

Frontend Tests

cd frontend
npm test                # Unit tests
npm run test:e2e       # E2E tests with Playwright

🎨 Design System

Our design system is built around:

  • Primary Color: Utlyze Blue (#4169E1)
  • Accent Color: Dark Slate (#34495E)

View the complete style guide:

cd frontend
npm run dev
# Navigate to http://localhost:3000/style-guide

πŸ“š Documentation

πŸ” Security

  • JWT-based authentication
  • End-to-end encryption for sensitive documents
  • Rate limiting and DDoS protection
  • Regular security audits
  • GDPR compliant data handling

πŸš€ Deployment

Production Build

# Frontend
cd frontend
npm run build
npm start

# Backend
cd backend
npm run build
npm start

Docker Deployment

# Build images
docker build -t lawyerofone-frontend ./frontend
docker build -t lawyerofone-backend ./backend

# Run with production config
docker-compose -f docker-compose.prod.yml up -d

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ“ž Support


Built with ❀️ by the LawyerOfOne Team

About

AI-powered legal support for small businesses

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors