- Creating an account.
- Email address validation.
- Signing-in with phone number.
- Signing-in with an email.
- Requesting an assistance: towing/repair.
- Accepting/refusing the assistance by an active assistant.
- Real-time assistance updates.
-
Python 3.9+
-
pip
-
virtualenv
-
PostgreSQL or SQLite
-
Notes:
- For the moment, the frontend is only tested with SQLite.
- You have to install PostgreSQL on your machine if you want to work with it.
- To switch between PostgreSQL and SQLite, comment/uncomment databse settings in settings.py.
-
Clone the repository (if you haven't already):
git clone https://github.com/aamxh/depannini.git cd depannini cd backend #you must be in this folder depannini/backend
-
Create and activate a virtual environment:
#Delete the existing folder first python -m venv venv source venv/bin/activate # On Windows: venv/Scripts/Activate #if you had problem look how to change the restriction policy
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
cd depannini #you must be in this folder depannini/backend/depannini to do the next steps
-
Run migrations:
python manage.py makemigrations python manage.py migrate
-
Create superuser: You use it to sign-in to Django admin panel, it's accessed from the web using the end-point: http://localhost:8000/admin/
python manage.py createsuperuser
-
Populate database:
python manage.py populate_data
-
Start the development server:
#you have to run this command when you see in the folder a file called manage.py daphne -b 0.0.0.0 -p 8000 depannini.asgi:application
;### Authentication
POST /api/auth/register/
- Signing-upPOST /api/auth/login/email/
- Email loginPOST /api/auth/login/phone/
- Phone loginPOST /api/auth/token/refresh/
- Refresh JWT tokenPOST /api/auth/password-reset/
- Request password resetPOST /api/auth/password-reset/confirm/
- Confirm password reset
GET /api/profile/user/
- Get user profilePUT /api/profile/user/
- Update user profileGET /api/profile/assistant/
- Get assistant profilePUT /api/profile/assistant/
- Update assistant profilePOST /api/profile/update-status/
- Update assistant status (active/inactive)POST /api/profile/update-location/
- Update assistant location
POST /assistance/request/
- Request an assitance by a userPOST /assistance/accept/<assistance_id>/
- Accept an assistance by an assistantPOST /assistance/update/status/<assistance_id>
- Update the assistance status- Web-Sockets endpoints:
/assistance/<assistance_id>/
- Connect to the assistance web-socket/assistant/<assistant_id>
- Connect to the assistant web-socket
- Flutter
- Android studio (recommended) or Visual Studio Code
- Google maps API keys: Android maps sdk key, iOS maps sdk key, directions key, and distance matrix key.
-
Clone the repository (if you haven't already)
git clone https://github.com/aamxh/depannini.git cd depannini
-
Install the required dependencies
cd depannini-user flutter pub get cd ../depannini-assistant flutter pub get
-
Add the Google maps SDK key for Android
Both apps require adding a valid Google maps SDK key to AndriodManifest.xml, either by:
-
Adding it directly inside android/app/src/main/AndroidManifest.xml:
<meta-data android:name="com.google.android.geo.API_KEY" android:value="@string/<YOUR_ACTUAL_KEY_HERE>"/>
-
Adding a refrence inside android/app/src/main/AndroidManifest.xml (recommended):
<meta-data android:name="com.google.android.geo.API_KEY" android:value="@string/google_maps_key"/>
Then add this to android/local.properties:
MAPS_API_KEY=<your_actual_key_here>
And before
defaultConfig()
block, add this to android/app/build.gradle:def MAPS_API_KEY = project.hasProperty("MAPS_API_KEY") ? project.MAPS_API_KEY : ""
Finally, add this inside
defaultConfig()
:resValue "string", "google_maps_key", MAPS_API_KEY
-
Run the apps
#From the root directory cd depannini-user flutter run #From the root directory cd depannini-assistant flutter run
- Mohammed Alsayed Ahmed - Front-end.
- Anes Adjal - Back-end.
- Merzougui Abdallah ElGhazali - Back-end.