Program Donasi is a backend application built using Flask to help manage users, contact_us, program donasi, donatur and donasi in support of the DevelopProgramDonasi campaign.
- User: Register, log in, update, and delete users.
- Contact_us: Create messages and get list messages.
- Program Donasi: Add, update, and delete programs.
- Donatur: Add, view, update, and delete donature.
- Donasi: Add, view, update, and delete donasi.
- Authentication: Uses JWT for user authentication.
Here is a screenshot of the application:
Here is a screenshot of the relationship flow:
This API allows users to interact with our service to manage their profiles, authenticate, and more.
The base URL for the API is: https://developprogramdonasi-be-2024.vercel.app
- GET /profile: Retrieve the profile of the currently logged-in user.
- Requires a valid JWT token.
- Returns the user’s ID, email, name, role, and timestamps.
For more detailed information on API endpoints and their usage, please refer to our API Documentation.
To set up the project locally, follow these steps:
- Clone the repository.
- Install the dependencies using Poetry.
- Configure the environment variables.
- Run the application.
-
Ensure your environment variables are set correctly. Example of
DATABASE_URI
for MySQL:DATABASE_URI=mysql+pymysql://user:password@host:port/dbname
-
Install the required packages using "poetry add":
poetry add flask sqlalchemy pymysql
-
Run your Flask application:
poetry run flask --app app run
By following these steps, you should be able to resolve successfully connect to your MySQL database using SQLAlchemy in your Flask application.
- Configure your database settings in the
.env
file:DB_NAME=your_database_name DB_USER=your_user DB_PASSWORD=your_password DB_HOST=your_host DB_PORT=your_port DATABASE_URI=mysql://your_user:your_password@your_host:your_port/your_database_name
- Connect MySQL Workbench to Aiven MySQL using the provided connection details. ...
This project is licensed under the MIT License - see the LICENSE file for details.
By following these steps, you can integrate Aiven for MySQL with your Flask application and manage your database using MySQL Workbench. The provided code snippets and documentation structure ensure that your project is well-organized and easy to set up.
...
still under development by Iman
copyright © 2024 by Iman