Skip to content

Repository files navigation

SafeWalk Backend

Overview

Step untuk repository backend

Installation

  • Clone this repository (with HTTPS preferred)

    $ git clone https://github.com/SafetyWalk/belerion.git

** Run locally in your computer**

  • Activate virtual environment, or create one if none has been created
    • Create virtual environment
      • Windows
        $ python -m venv env
      • Mac
        $ virtualenv env
    • Activate virtual environment
      • Windows
        $ env\Scripts\activate
      • Mac
        $ env/bin/activate
  • Install required packages
    $ pip install -r requirements.txt
  • Migrate if needed
    $ python manage.py migrate
  • Run the server in your local (localhost:8000)
    $ python manage.py runserver

Development

  • Run this script for auto migrate, populate data, and runserver
    sh auto.sh
  • Admin, Go to localhost:8000/admin
  • Login with
    Username: admin
    Email: eugeniusms@gmail.com
    Password: admin123
    

URLs

ServiceDescriptionURLMethodPayload
AdminAdmin Page{{url}}/admin--
AuthenticationRegister Manual User{{url}}/api/v1/authentication/manual-user/GET, POST-
AuthenticationRegister Google User{{url}}/api/v1/authentication/google-user/GET, POST-
AuthenticationLogin Manual User{{url}}/api/v1/authentication/manual-user/login/POST-
AuthenticationLogin Google User{{url}}/api/v1/authentication/google-user/login/POST-
AuthenticationEdit Password Manual User{{url}}/api/v1/authentication/manual-user/edit/password/PUT-
ProfileGet Profile Manual User{{url}}/api/v1/profile/manual-user/GET-
ProfileGet Profile Google User{{url}}/api/v1/profile/google-user/GET-
ProfileEdit Profile Manual User{{url}}/api/v1/profile/manual-user/edit/PUT-
ProfileEdit Profile Google User{{url}}/api/v1/profile/google-user/edit/PUT-
ContactCreate Contact Manual User{{url}}/api/v1/contact/manual-user/create/POST-
ContactCreate Contact Google User{{url}}/api/v1/contact/google-user/create/POST-
ContactGet Contacts Manual User{{url}}/api/v1/contact/manual-user/POST-
ContactGet Contacts Google User{{url}}/api/v1/contact/google-user/POST-
ContactEdit Contact Manual User{{url}}/api/v1/contact/manual-user/edit/PUT-
ContactEdit Contact Google User{{url}}/api/v1/contact/google-user/edit/PUT-
ContactDelete Contact Manual User{{url}}/api/v1/contact/manual-user/delete/DELETE-
ContactDelete Contact Google User{{url}}/api/v1/contact/google-user/delete/DELETE-

Deployment

  • Create a new project in Google Cloud Platform
  • Activate Google SDK in your terminal
  • Create python virtual environment 'venv' that will be used for deployment, activate it, and install required requirements.txt
  • Run gcloud init in your terminal
  • Run gcloud app deploy in your terminal

Releases

Packages

Used by

Contributors

Languages