GithubHelp home page GithubHelp logo

relief-tracker's Introduction

RELIEF-TRACKER

This project consists of both frontend and backend components aimed at providing.

Backend Setup

Prerequisites

  • Python 3.10.x
  • Pip
  • Virtual Environment (Optional but recommended)

Steps to Setup Backend

  1. Install venv if not already installed. (Only for Ubuntu)

    sudo apt install python3.10-venv
  2. Clone this repository and navigate to the backend directory.

    cd backend
  3. Create a virtual environment.

    python -m venv venv
  4. Activate the virtual environment:

    • For Windows:
    venv\Scripts\activate
    • For Ubuntu or other Unix-based systems:
    source venv/bin/activate
  5. Install the required Python packages.

    pip install -r requirements.txt
  6. Migrate the database.

    python manage.py migrate
  7. Create a superuser for accessing the admin panel.

    python manage.py createsuperuser

    Follow the prompts to set up the superuser account.

  8. Start the backend server.

    python manage.py runserver
  9. To deactivate the virtual environment, simply run:

    deactivate

Frontend Setup

Prerequisites

  • Flutter SDK
  • Android Studio / Xcode (for mobile app development)
  • Visual Studio Code / Android Studio IDE (optional but recommended)

Steps to Setup Frontend

  1. Navigate to the app directory in the project root.

    cd app
  2. Install dependencies using flutter.

    flutter pub get
  3. After installation is complete, start the frontend server.

    flutter run
  4. Your Flutter app should now be running on your device or emulator.

Configuration

Retrieving IP Address

To configure your Flutter frontend to communicate with the backend, you'll need to retrieve the IP address of your machine. Follow these steps:

For Windows:

  1. Open Command Prompt.

  2. 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.

    Windows ipv4

For macOS / Linux:

  1. Open Terminal.

  2. 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.

    Ubuntu ipv4

Configuring Flutter App

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:

  1. Open your Flutter project in your preferred code editor.

  2. Navigate to config.dart in app\lib\data\datasource\remote\utils.

  3. 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
     }
  4. 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.

relief-tracker's People

Contributors

sami-63 avatar alomgir27 avatar ariful-2019331062 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.