RaktSetu — Hyperlocal Blood Donor Emergency App | Flutter + Django Final Year Project with Source Code
Back to ProjectGet these installed first. Doing this now saves you an hour of confusion later.
flutter doctor and fix whatever it complains about. Android licence warnings are the usual one.PostgreSQL is optional. The project falls back to SQLite locally and that's completely fine for your submission.
Open a terminal inside the project folder and move into the backend.
cd backend
python -m venv venv
Now activate it. Windows:
venv\Scripts\activate
macOS or Linux:
source venv/bin/activate
You'll see (venv) appear at the start of your prompt. That's how you know it worked.
pip install -r requirements.txt
cp .env.example .env
On Windows use copy .env.example .env instead. Open the new .env file in any editor. For local development you don't need to change a single value — the defaults use SQLite, console SMS and console FCM. Leave it alone and move on.
python manage.py migrate
python manage.py seed_data
The seed command creates donors spread across a city with different blood groups and different last-donation dates. Without it your matching demo returns an empty list and you'll think the code is broken. It isn't. You just have no donors.
Make an admin account too:
python manage.py createsuperuser
You need three terminals open at once. First one, Redis:
redis-server
Second terminal — activate the venv again, then start the worker:
celery -A raktsetu_backend worker -l info
Third terminal, the scheduler that expires old requests:
celery -A raktsetu_backend beat -l info
On Windows, add --pool=solo to the worker command or it'll throw a permission error.
Back in your first backend terminal:
python manage.py runserver
Open http://127.0.0.1:8000/admin/ and log in with the superuser you just made. If you see donors listed there, the backend is done.
New terminal, from the project root:
cd raktsetu_app
flutter pub get
Open lib/core/network/api_config.dart. There's a base URL constant at the top. It defaults to http://10.0.2.2:8000/api/, which is the address an Android emulator uses to reach your host machine — it looks wrong but it's correct for emulators. If you're running in Chrome, change it to http://127.0.0.1:8000/api/. Then:
flutter run
Pick your device when it asks. Chrome is the fastest option for a first check.
Nine times out of ten it's the base URL in api_config.dart. Emulator needs 10.0.2.2, browser needs 127.0.0.1, a real phone on your WiFi needs your laptop's local IP like 192.168.1.x — and for that last one you also have to run Django as python manage.py runserver 0.0.0.0:8000, otherwise it only listens on localhost.
It's not being sent anywhere, and that's intentional. Look at your Django terminal — the OTP is printed there. The API response also carries a debug_otp field in dev mode. Copy it from either place.
Your Celery worker isn't running, or Redis isn't. Check that second and third terminal. If the worker logs show notify_nearby_donors_task received and succeeded, the pipeline is alive.
Expected until you add a Google Cloud Maps API key. The key slot is already in the Android manifest and web index — you just paste yours in. Location capture through geolocator keeps working regardless, so nothing else is affected.
Do this end of setup, before you show anyone:
If all five happen, you're ready to submit. If step 3 finds no donors, check the donor's availability toggle and their last donation date — anything under 90 days ago and the matcher skips them on purpose.
Our team is here to assist you with installation and setup.