Skip to content

Latest commit

 

History

History
235 lines (183 loc) · 6 KB

File metadata and controls

235 lines (183 loc) · 6 KB

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