Complete Installation & Setup Guide
Follow this comprehensive guide to set up the College Dating App on your system. This guide covers installation for Windows, macOS, and Linux operating systems.
📋 Prerequisites & System Requirements
Before starting the installation, ensure your system meets the following requirements:
Required Software
- Python: Version 3.8 or higher
- Flutter SDK: Latest stable version (3.0+)
- Git: For cloning the repository (optional)
- Code Editor: VS Code or Android Studio recommended
- Android Studio: For Android development and emulator
- Xcode: For iOS development (macOS only)
System Requirements
- RAM: Minimum 8GB (16GB recommended)
- Disk Space: At least 10GB free space
- Operating System: Windows 10/11, macOS 10.14+, or Linux (Ubuntu 18.04+)
Step 1: Install Python
For Windows
- Download Python from https://www.python.org/downloads/
- Run the installer (python-3.x.x.exe)
- Important: Check the box "Add Python to PATH" during installation
- Click "Install Now" and wait for completion
- Verify installation by opening Command Prompt and typing:
python --version
- Also verify pip installation:
pip --version
For macOS
- Open Terminal application
- Install Homebrew if not already installed:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install Python using Homebrew:
brew install python@3.11
- Verify installation:
python3 --version
pip3 --version
For Linux (Ubuntu/Debian)
- Open Terminal
- Update package list:
sudo apt update
- Install Python:
sudo apt install python3 python3-pip python3-venv
- Verify installation:
python3 --version
pip3 --version
Step 2: Install Flutter SDK
For Windows
- Download Flutter SDK from https://docs.flutter.dev/get-started/install/windows
- Extract the zip file to a location like C:\src\flutter
- Add Flutter to PATH:
- Search for "Environment Variables" in Windows search
- Click "Environment Variables" button
- Under "User variables", find "Path" and click "Edit"
- Click "New" and add: C:\src\flutter\bin
- Click "OK" to save
- Open new Command Prompt and verify:
flutter --version
- Run Flutter Doctor to check setup:
flutter doctor
- Install any missing dependencies shown by Flutter Doctor
For macOS
- Download Flutter SDK from https://docs.flutter.dev/get-started/install/macos
- Extract the downloaded file to your home directory:
cd ~
unzip ~/Downloads/flutter_macos_3.x.x-stable.zip
- Add Flutter to PATH by editing your shell profile:
nano ~/.zshrc
Add this line:
export PATH="$PATH:$HOME/flutter/bin"
- Save and apply changes:
source ~/.zshrc
- Verify installation:
flutter --version
flutter doctor
- For iOS development, install Xcode from App Store
- Accept Xcode license:
sudo xcodebuild -license accept
For Linux
- Download Flutter SDK from https://docs.flutter.dev/get-started/install/linux
- Extract to home directory:
cd ~
tar xf ~/Downloads/flutter_linux_3.x.x-stable.tar.xz
- Add Flutter to PATH:
nano ~/.bashrc
Add this line:
export PATH="$PATH:$HOME/flutter/bin"
- Apply changes:
source ~/.bashrc
- Install required dependencies:
sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
- Verify installation:
flutter --version
flutter doctor
Step 3: Install Android Studio
For All Operating Systems
- Download Android Studio from https://developer.android.com/studio
- Run the installer and follow the setup wizard
- During installation, ensure these components are selected:
- Android SDK
- Android SDK Platform
- Android Virtual Device (AVD)
- After installation, open Android Studio
- Go to Settings → Appearance & Behavior → System Settings → Android SDK
- Install the latest Android SDK Platform (API 33 or higher)
- Install Flutter and Dart plugins:
- Go to Settings → Plugins
- Search for "Flutter" and click "Install"
- This will also install the Dart plugin
- Restart Android Studio
Create Android Virtual Device (Emulator)
- Open Android Studio
- Click on "More Actions" → "Virtual Device Manager"
- Click "Create Device"
- Select a device definition (e.g., Pixel 6) and click "Next"
- Select a system image (API 33 recommended) and click "Download" if needed
- Click "Next" and then "Finish"
- Your emulator is now ready to use
Step 4: Download and Extract Project Files
- Download the project ZIP file from CodeAj Marketplace
- Extract the ZIP file to a location of your choice (e.g., C:\Projects\dating-app on Windows or ~/Projects/dating-app on macOS/Linux)
- The extracted folder should contain two main directories:
- backend - Django backend application
- frontend - Flutter mobile application
Step 5: Backend Setup (Django)
Navigate to Backend Directory
Windows Command Prompt:
cd C:\Projects\dating-app\backend
macOS/Linux Terminal:
cd ~/Projects/dating-app/backend
Create Virtual Environment
For Windows:
python -m venv venv
venv\Scripts\activate
You should see (venv) prefix in your command prompt after activation.
For macOS/Linux:
python3 -m venv venv
source venv/bin/activate
You should see (venv) prefix in your terminal after activation.
Install Python Dependencies
For Windows:
pip install -r requirements.txt
For macOS/Linux:
pip3 install -r requirements.txt
This will install the following packages:
- Django: Web framework
- djangorestframework: REST API toolkit
- djangorestframework-simplejwt: JWT authentication
- django-cors-headers: CORS handling for mobile apps
- Pillow: Image processing library
Configure Database
Run database migrations to create all necessary tables:
python manage.py migrate
This creates tables for:
- User authentication
- User profiles
- Photos
- Matches
- Messages
- Swipe actions
Create Superuser Account
Create an admin account to access Django admin panel:
python manage.py createsuperuser
You will be prompted to enter:
- Username: Choose an admin username
- Email: Enter your email address
- Password: Create a strong password (must be at least 8 characters)
- Password confirmation: Re-enter the same password
Start Development Server
Run the Django development server:
python manage.py runserver 0.0.0.0:8000
The backend server will start on http://127.0.0.1:8000
You can access the admin panel at http://127.0.0.1:8000/admin
Important: Keep this terminal window open. The server must be running for the mobile app to work.
Verify Backend Installation
- Open a web browser
- Navigate to http://127.0.0.1:8000/admin
- Login with the superuser credentials you created
- You should see the Django administration interface
Step 6: Frontend Setup (Flutter)
Important: Open a NEW terminal/command prompt window. Do not close the backend server terminal.
Navigate to Frontend Directory
Windows Command Prompt:
cd C:\Projects\dating-app\frontend
macOS/Linux Terminal:
cd ~/Projects/dating-app/frontend
Install Flutter Dependencies
flutter pub get
This will install all required packages:
- provider: State management solution
- http: For making API requests
- flutter_secure_storage: Secure token storage
- cached_network_image: Image caching
- flutter_card_swiper: Swipe card functionality
- intl: Date formatting
Configure API Endpoint
You need to configure the API base URL based on where you're running the app:
- Open the file lib/services/api_service.dart in your code editor
- Find the line containing static const String baseUrl
- Update based on your setup:
Option A: Running on Android Emulator
static const String baseUrl = 'http://10.0.2.2:8000/api';
Note: 10.0.2.2 is the special IP address that Android emulator uses to access localhost on your computer.
Option B: Running on Physical Android Device
First, find your computer's IP address:
Windows:
- Open Command Prompt
- Type:
ipconfig
- Look for "IPv4 Address" under your active network adapter
- Example: 192.168.1.100
macOS:
- Open Terminal
- Type:
ifconfig | grep "inet "
- Look for the IP address (not 127.0.0.1)
- Example: 192.168.1.100
Linux:
- Open Terminal
- Type:
ip addr show
- Look for inet under your active network interface
- Example: 192.168.1.100
Then update the baseUrl:
static const String baseUrl = 'http://YOUR_IP_ADDRESS:8000/api';
Example: http://192.168.1.100:8000/api
Option C: Running on iOS Simulator (macOS only)
static const String baseUrl = 'http://127.0.0.1:8000/api';
Important Configuration for Physical Devices
If testing on a physical device, ensure:
- Your phone and computer are on the same WiFi network
- Firewall allows connections on port 8000
- Django server is running with 0.0.0.0:8000 (not just 127.0.0.1)
Enable Developer Mode on Physical Device
For Android:
- Go to Settings → About Phone
- Tap Build Number 7 times
- Go back to Settings → Developer Options
- Enable USB Debugging
- Connect phone to computer via USB
- Accept the USB debugging prompt on phone
For iOS (macOS only):
- Connect iPhone to Mac via USB
- Trust the computer on iPhone when prompted
- Open Xcode
- Go to Xcode → Preferences → Accounts
- Add your Apple ID
Step 7: Run the Application
Start an Emulator or Connect Device
Option A: Using Android Emulator
- Open Android Studio
- Click on "Device Manager" icon
- Click the Play button next to your virtual device
- Wait for the emulator to fully boot up
Option B: Using Physical Device
- Connect your phone via USB cable
- Ensure USB debugging is enabled
- Accept any connection prompts on your phone
Check Connected Devices
Verify Flutter can see your device:
flutter devices
You should see your emulator or physical device listed.
Run the Flutter App
Start the application:
flutter run
If multiple devices are connected, Flutter will ask you to choose one. The app will compile and launch on the selected device.
First-time compilation may take 2-5 minutes. Subsequent runs will be faster.
Hot Reload During Development
While the app is running, you can make code changes and see them instantly:
- Press r in the terminal for hot reload
- Press R for hot restart
- Press q to quit
Step 8: Testing the Application
Method 1: Create Test Users via App
- Open the app on your device/emulator
- Click on "Sign Up" or "Register"
- Fill in the registration form:
- Username: testuser1
- Email: testuser1@college.edu
- Password: Test@123
- Confirm Password: Test@123
- Complete your profile:
- Name: Test User One
- Age: 21
- Gender: Male/Female
- College: XYZ College
- Bio: Test bio
- Upload a profile photo
- Set your discovery preferences (age range, gender)
- Logout and repeat steps 2-6 to create a second user (testuser2)
- Important: Both users must be from the same college and match each other's preferences
Method 2: Create Test Users via Django Admin
- Open browser and navigate to http://127.0.0.1:8000/admin
- Login with your superuser credentials
- Click on "Users" under Authentication and Authorization
- Click "Add User" button
- Create user with username and password
- Click "Save and continue editing"
- Scroll down and add email, first name, last name
- Click "Save"
- Go to "Profiles" section
- Click "Add Profile"
- Select the user you just created
- Fill in profile details (age, gender, college, bio)
- Set preferences (min/max age, gender interest)
- Click "Save"
- Repeat for second user
Test the Matching Feature
- Login as User 1
- Go to Discovery/Explore section
- You should see User 2's profile card
- Swipe Right to Like User 2
- Logout from User 1
- Login as User 2
- Go to Discovery/Explore section
- You should see User 1's profile card
- Swipe Right to Like User 1
- You should see "It's a Match!" popup
Test the Messaging Feature
- After matching, go to Matches section
- Click on the matched user
- Type a message in the text field
- Click Send button
- Message should appear in the chat
- Switch to the other user account
- Open the same match
- You should see the message received
- Send a reply to test two-way communication
Common Issues and Solutions
Issue 1: "Connection Refused" Error in Flutter App
Problem: App cannot connect to backend server
Solutions:
- Verify Django server is running (check terminal)
- Check if baseUrl in api_service.dart is correct
- For physical device, ensure phone and computer are on same WiFi
- Check firewall settings allow port 8000
- Try accessing http://YOUR_IP:8000/api in phone browser to verify connectivity
Issue 2: Images Not Loading in App
Problem: Profile photos not displaying
Solutions:
- Check MEDIA_ROOT and MEDIA_URL in Django settings.py
- Verify media files folder exists in backend directory
- Ensure Django is serving media files in development (check urls.py)
- Clear app cache and restart
Issue 3: "JWT Token Invalid" Error
Problem: Authentication errors after login
Solutions:
- Verify djangorestframework-simplejwt is installed
- Check JWT settings in Django settings.py
- Logout and login again to get fresh tokens
- Clear app data and try again
Issue 4: Flutter Build Errors
Problem: App fails to build or compile
Solutions:
- Run:
flutter clean
- Then run:
flutter pub get
- Delete build folder manually if needed
- Restart IDE and try again
- Check Flutter version:
flutter doctor
Issue 5: CORS Errors
Problem: Cross-origin request blocked
Solutions:
- Verify django-cors-headers is in INSTALLED_APPS
- Check CORS_ALLOWED_ORIGINS in settings.py
- Add your mobile app's origin to allowed origins
- Restart Django server after changes
Issue 6: Database Errors
Problem: Database migration or query errors
Solutions:
Issue 7: Virtual Environment Not Activating
Problem: Cannot activate Python virtual environment
Solutions:
Issue 8: Android Emulator Won't Start
Problem: Emulator fails to launch
Solutions:
- Enable virtualization in BIOS (VT-x for Intel, AMD-V for AMD)
- Ensure you have enough RAM (8GB minimum)
- Try creating a new virtual device with lower resolution
- Update Android Studio and SDK tools
- Check Graphics settings in AVD configuration
Issue 9: Module Not Found Errors (Python)
Problem: ImportError for Django or other packages
Solutions:
Issue 10: App Crashes on Startup
Problem: Flutter app crashes immediately
Solutions:
- Check logs in terminal for error messages
- Verify all dependencies are installed:
flutter pub get
- Clear app data on device
- Uninstall and reinstall the app
- Check for null safety issues in code
Additional Configuration
Configure Allowed Hosts (Django)
For production or network access, update settings.py:
ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'YOUR_IP_ADDRESS']
Configure CORS Settings (Django)
Update CORS_ALLOWED_ORIGINS in settings.py:
CORS_ALLOWED_ORIGINS = [
"http://localhost:8000",
"http://127.0.0.1:8000",
"http://10.0.2.2:8000",
]
Media Files Configuration (Django)
Ensure these settings are in settings.py:
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
Database Migration (If Models Change)
If you modify Django models, run:
python manage.py makemigrations
python manage.py migrate
Daily Development Workflow
Starting Work Session
- Open two terminal windows
- Terminal 1 - Backend:
cd backend
venv\Scripts\activate # Windows
source venv/bin/activate # macOS/Linux
python manage.py runserver 0.0.0.0:8000
- Terminal 2 - Frontend:
cd frontend
flutter run
Stopping Work Session
- In Flutter terminal: Press q to quit
- In Django terminal: Press Ctrl+C to stop server
- Deactivate virtual environment:
deactivate
API Testing with Postman (Optional)
Install Postman
- Download from https://www.postman.com/downloads/
- Install and create a free account
Test API Endpoints
Register User:
- Method: POST
- URL: http://127.0.0.1:8000/api/register/
- Body (JSON):
{
"username": "testuser",
"email": "test@example.com",
"password": "Test@123",
"password2": "Test@123"
}
Login:
Get Profile (Requires Authentication):
- Method: GET
- URL: http://127.0.0.1:8000/api/profile/
- Headers: Authorization: Bearer YOUR_ACCESS_TOKEN
Production Deployment Notes
When deploying to production, consider:
Django Backend
- Set DEBUG = False in settings.py
- Configure proper ALLOWED_HOSTS
- Use PostgreSQL or MySQL instead of SQLite
- Set up proper STATIC_ROOT and MEDIA_ROOT
- Use environment variables for sensitive data
- Deploy with Gunicorn or uWSGI
- Set up HTTPS with SSL certificates
- Configure proper CORS settings
Flutter Frontend
Support & Resources
Official Documentation
- Flutter: https://docs.flutter.dev
- Django: https://docs.djangoproject.com
- Django REST Framework: https://www.django-rest-framework.org
Video Tutorials
Search on YouTube for:
- "Flutter REST API integration tutorial"
- "Django REST Framework authentication"
- "Flutter Provider state management"
Getting Help
- Check the project README.md file for additional information
- Review error messages carefully in terminal
- Use Flutter Doctor:
flutter doctor -v
- Search error messages on Stack Overflow
- Contact CodeAj support for project-specific help
Additional Services from CodeAj
- Project Setup Assistance: Get help with installation and configuration
- Source Code Explanation: Detailed walkthrough of the codebase
- Custom Features: Add or modify features based on your requirements
- Project Report: Complete documentation and presentation materials
- Research Paper Writing: Academic paper for journal publication
- Mentorship: One-on-one guidance throughout your project
Installation Success Checklist
Verify your installation is complete:
- ✓ Python 3.8+ installed and verified
- ✓ Flutter SDK installed and flutter doctor passes
- ✓ Android Studio installed with Flutter plugin
- ✓ Backend virtual environment created and activated
- ✓ Backend dependencies installed from requirements.txt
- ✓ Database migrations completed successfully
- ✓ Superuser account created
- ✓ Django server running on port 8000
- ✓ Frontend dependencies installed with flutter pub get
- ✓ API baseUrl configured correctly
- ✓ App runs on emulator or physical device
- ✓ Test users created and can login
- ✓ Matching feature works between users
- ✓ Messaging feature functional
If all items are checked, your installation is complete and successful!
Next Steps After Installation
- Familiarize yourself with the codebase structure
- Read through the API documentation
- Customize UI colors and branding
- Add additional features based on requirements
- Test thoroughly on different devices
- Prepare project documentation and presentation
- Create demo video showcasing features
- Document any customizations made
Conclusion
Congratulations on successfully setting up the College Dating App! This comprehensive installation guide has walked you through every step from prerequisites to testing. You now have a fully functional dating application that demonstrates modern mobile development practices using Flutter and Django.
This project serves as an excellent foundation for your final year project, showcasing your ability to build full-stack applications with authentication, real-time features, and modern UI/UX design. The skills you've gained through this setup process are highly valuable in the software development industry.
For any additional assistance, custom modifications, or advanced features, feel free to explore the additional services offered by CodeAj Marketplace. Happy coding!