Welcome to the Benji API Client Backend Repository! This repository contains the complete backend implementation for the Benji Application, built using Laravel. It provides the core functionality and API endpoints required for the Benji ecosystem, integrating seamlessly with the frontend and admin modules.
The Benji API Client serves as the backbone of the Benji ecosystem, managing data flow, business logic, and API endpoints. It powers features for user management, financial insights, authentication, and much more.
- User Management: APIs for user registration, authentication, and role management.
- Financial Insights: Endpoints for managing and analyzing financial data.
- Integration with Third-Party Services: Seamless integration with payment gateways, Google APIs, and more.
- Secure Authentication: Token-based authentication using Laravel Sanctum.
- Scalable Architecture: Designed to handle large-scale applications.
- app/: Core application logic and models.
- config/: Configuration files for database, services, and other settings.
- database/: Migrations, seeders, and factories for database setup.
- routes/: API route definitions (web.php, api.php).
- resources/views/: Laravel Blade templates for web rendering.
- storage/: Logs, cached files, and compiled views.
Ensure the following dependencies are installed:
- PHP 8.1+
- Composer
- MySQL database
- Laravel Framework 10.10
- Node.js and npm (for asset management)
- Redis (optional for caching and queue management)
Configure the .env file for your environment:
APP_NAME=BenjiAPI
APP_ENV=local
APP_KEY=base64:your_app_key_here
APP_DEBUG=true
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=benji_database
DB_USERNAME=root
DB_PASSWORD=your_password
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="noreply@benji.com"
MAIL_FROM_NAME="Benji Support"
SANCTUM_STATEFUL_DOMAINS=localhost-
Clone the Repository:
git clone https://github.com/yesenvidnath/BenjiAPIClient.git cd BenjiAPIClient -
Install PHP Dependencies:
composer install
-
Set Up Environment Variables: Create a
.envfile and configure it as described above. -
Run Database Migrations and Seeders:
php artisan migrate --seed
-
Serve the Application:
php artisan serve
-
Set Up Storage: Link the storage directory for public access:
php artisan storage:link
-
Compile Frontend Assets (Optional):
npm install npm run dev
POST /api/register: Register a new user.POST /api/login: Log in a user.POST /api/logout: Log out the current user.
GET /api/expenses: Retrieve user expenses.POST /api/expenses: Add a new expense.PUT /api/expenses/{id}: Update an expense.DELETE /api/expenses/{id}: Delete an expense.
GET /api/users: Retrieve all users.POST /api/users: Add a new user.DELETE /api/users/{id}: Delete a user.
For detailed documentation, visit the API Documentation.
Contributions are welcome! Please adhere to the following steps:
- Fork the repository and create a new branch for your feature or bugfix.
- Write clean, well-documented code.
- Test your changes thoroughly before submitting a pull request.
- Open a detailed pull request with a summary of your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For further inquiries or support:
- Name: K.K.Y. Vidnath
- Email: support@benji.com
Thank you for contributing to the Benji API Client!