A comprehensive legal assistance platform connecting Cameroonians with legal resources and qualified lawyers.
- AI-powered legal assistance for common legal questions
- Lawyer directory with ratings and reviews
- Lawyer application and profile management
- User authentication with email/SMS 2FA
- Dark/light theme support
- Search history tracking
- Responsive design for all devices
- Node.js 18 or higher
- XAMPP (for local development)
- Docker (for production deployment)
- Clone the repository:
git clone https://github.com/yourusername/cameroon-legal-assistant.git
cd cameroon-legal-assistant- Install dependencies:
npm install- Set up the database:
- Start XAMPP
- Create a new database named
lawhelp - Import the database schema from
database/schema.sql
- Configure environment variables:
cp .env.example .envEdit .env with your configuration:
DB_HOST=localhost
DB_USER=root
DB_PASS=
DB_NAME=lawhelp
JWT_SECRET=your_secret_key
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-specific-password
SMS_PROVIDER_API_KEY=your-sms-api-key
VITE_AI_MODEL_ENDPOINT=http://localhost:5000/predict
- Start the development server:
npm run dev- Email: abdou@gmail.com
- Password: abdou1
The application uses a custom AI model for legal assistance. To integrate your trained model:
- Place your model files in the
ai-modeldirectory:
ai-model/
├── models/ # Trained model files
├── src/ # Model serving code
├── requirements.txt # Python dependencies
└── Dockerfile # Container configuration
- Update the model endpoint in
.env:
VITE_AI_MODEL_ENDPOINT=http://localhost:5000/predict
- Build and run the Docker containers:
docker-compose up -d- Configure SMTP settings in
.env:
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-specific-password
- For Gmail:
- Enable 2-Step Verification in your Google Account
- Generate an App Password for the application
- Use the App Password in SMTP_PASS
- Configure SMS provider in
.env:
SMS_PROVIDER_API_KEY=your-sms-api-key
- Update SMS service configuration in
services/auth/src/config/sms.js
The application follows a microservices architecture with the following services:
- Frontend (React + TypeScript)
- Auth Service (with 2FA support)
- User Service
- Lawyer Service
- Chat Service (with AI model integration)
- Rating Service
- History Service
Each service is containerized using Docker and can be deployed independently.
For detailed architecture information, see ARCHITECTURE.md.
POST /api/auth/login
POST /api/auth/register
POST /api/auth/verify-2fa
POST /api/auth/logout
GET /api/lawyers
GET /api/lawyers/:id
POST /api/lawyers/apply
PUT /api/lawyers/:id
POST /api/lawyers/:id/rate
GET /api/users/profile
PUT /api/users/profile
PUT /api/users/password
PUT /api/users/2fa
POST /api/chat/send
GET /api/chat/history
- Build the images:
docker-compose build- Start the services:
docker-compose up -d- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request