Bismillah Selesai is a backend application built with Django and Django REST Framework. It provides APIs for user authentication, face shape prediction, hairstyle and accessory recommendations, and user profile management.
- User registration and authentication
- Face shape prediction using a pre-trained model
- Hairstyle and accessory recommendations based on face shape and gender
- User profile management
- Password reset and change functionality
- Logging and error handling
- Rate limiting for API endpoints
- Python 3.8+
- PostgreSQL
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/yourusername/bismillah-selesai.git cd bismillah-selesai -
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate -
Install the dependencies:
pip install -r requirements.txt
-
Set up the PostgreSQL database and update the
config/settings.pyfile with your database credentials. -
Run the migrations:
python manage.py makemigrations python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
POST /api/login/- User loginPOST /api/register/- User registrationPOST /api/logout/- User logoutPOST /api/predict/- Predict face shapeGET /api/profile/- Get user profilePUT /api/profile/update/- Update user profilePOST /api/password-change/- Change passwordPOST /api/password-reset/- Request password resetPOST /api/password-reset/confirm/- Confirm password resetPOST /api/delete-image/- Delete imagePOST /api/save-record/- Save user choicesPOST /api/history/<int:history_id>/note/- Update history note
-
Build and push the Docker image:
docker build -t yourusername/bismillah-selesai:latest . docker push yourusername/bismillah-selesai:latest -
Deploy to your VPS using the provided GitHub Actions workflow.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License.