Skip to content

raksha-life/OpenSalve

 
 

Repository files navigation

OpenSalve

Setup

After cloning the repo,

  • Setup pipenv
  • With the repo folder as the present working directory, setup the environment :
    pipenv install
  • Open file .env and set secret key :
    DJANGO_SECRET_KEY='random stuff here...'
    
    For this very purpose, one could use the following code.
    import random
    "".join([random.SystemRandom().choice('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(96)])
  • Activate environment :
    pipenv shell
  • Migrate :
    python manage.py makemigrations && python manage.py migrate
  • Start server :
    python manage.py runserver

Contributing

TODO

  • User Accounts
    • Login/Register
    • User Roles
  • Help Requests
    • Register request
    • Get request complete info
    • Resolve request
    • Status of request
    • Comments on request
    • Visualize request in maps
    • Editing requests
    • Prioritizing Requests
    • Live location with GPS
  • Camps
    • Add & List
    • Camp requirements
    • Inhabitants
      • Allow camp manager to add
  • Collection Centres
    • Add & List
    • Supplies required
      • List quantity, unit
    • Stock view

API Docs

Use an interactive API documentation from /docs after setting up OpenSalve locally on http://127.0.0.1:8000.

Or use the online API docs.

Steps to generate static API docs :

  • Install spectacle-docs :
    npm install -g spectacle-docs
  • Save the OpenAPI in JSON format to api.json file (where http://127.0.0.1:8000 is where OpenSalve is running) :
    curl http://127.0.0.1:8000/docs/?format=openapi > api.json
    
  • Generate docs :
    spectacle api.json -t docs
    
  • Cleanup :
    rm api.json
    

Or use this one liner :

curl http://127.0.0.1:8000/docs/?format=openapi > api.json && spectacle api.json -t docs && rm api.json

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Dockerfile 0.2%