This project consists of both frontend and backend components aimed at providing.
- Python 3.10.x
- Pip
- Virtual Environment (Optional but recommended)
-
Install
venv
if not already installed. (Only for Ubuntu)sudo apt install python3.10-venv
-
Clone this repository and navigate to the backend directory.
cd backend
-
Create a virtual environment.
python -m venv venv
-
Activate the virtual environment:
- For Windows:
venv\Scripts\activate
- For Ubuntu or other Unix-based systems:
source venv/bin/activate
-
Install the required Python packages.
pip install -r requirements.txt
-
Migrate the database.
python manage.py migrate
-
Create a superuser for accessing the admin panel.
python manage.py createsuperuser
Follow the prompts to set up the superuser account.
-
Start the backend server.
python manage.py runserver
-
To deactivate the virtual environment, simply run:
deactivate
- Flutter SDK
- Android Studio / Xcode (for mobile app development)
- Visual Studio Code / Android Studio IDE (optional but recommended)
-
Navigate to the
app
directory in the project root.cd app
-
Install dependencies using flutter.
flutter pub get
-
After installation is complete, start the frontend server.
flutter run
-
Your Flutter app should now be running on your device or emulator.
To configure your Flutter frontend to communicate with the backend, you'll need to retrieve the IP address of your machine. Follow these steps:
-
Open Command Prompt.
-
Run the following command to retrieve your IPv4 address:
ipconfig /all
Look for the "IPv4 Address" under your active network adapter. Note down this address.
-
Open Terminal.
-
Run the following command to retrieve your IPv4 address:
ifconfig
or
ip addr
Look for the "inet" or "inet addr" field under your active network adapter. Note down this address.
Once you have the IPv4 address, you can configure your Flutter app to use it as the base URL for communicating with the backend. Follow these steps:
-
Open your Flutter project in your preferred code editor.
-
Navigate to
config.dart
inapp\lib\data\datasource\remote\utils
. -
Replace the
baseUrl
with the retrieved IPv4 address and appropriate port number.Example:
class Config { static const String baseUrl = 'http://your-ipv4-address:8000/api/'; // Replace 'your-ipv4-address' with your actual IPv4 address }
-
Save the file and rebuild your Flutter app.
Now, your Flutter frontend should be able to communicate with the backend using the configured IP address. Make sure your backend server is running and accessible from your network.