Git Product home page Git Product logo

hackalog-backend's Introduction

Hackalog-Backend

Instructions for setting up this project

  • Fork and clone the project in your device.
  • pipenv shell(If you're not aware of what pipenv, have look at this blog).
  • pipenv install

Creating and securing firebase credentials

Below steps talk about creating and securing your firebase admin credentials, this step needs to be done only once for setting up your .env file.

  • Go to Firebase console and create a firebase project.
  • In firebase console go to settings > Service accounts
  • Click Generate New Private Key, then confirm by clicking Generate Key.
  • Save the Json file containing key details, with name firebase_admin.json in same level directory as manage.py.
  • Open a file named encrypt_credentials.py already present in same directory, and edit the password(line: 6) you want to use for encryption. Note: You are advised to use long and random password, as you do not need to remember it after that.
  • Run python encrypt_credentials.py to encrypt your Json file. This will generate a file named firebase_admin.aes and will also print FIREBASE_DECRYPT_SIZE in the output.
  • Create a file named .env and copy contents into it from another file named template_env which is already present.
  • In your .env file put the value of FIREBASE_DECRYPT_KEY as the password you used for encryption, and FIREBASE_DECRYPT_SIZE as the number generated in output that came after encrypting the file.
  • Undo the changes you made to encrypt_credentials.py(that is again make the password as please-use-a-long-random-password), otherwise your encryption key(password) will become public.

You have successfully created required environment variables.

  • Now you can apply the migrations and start the server

hackalog-backend's People

Contributors

aishwary023 avatar atpug22 avatar krashish8 avatar m-e-l-u-h-a-n avatar nb9960 avatar nishantwrp avatar shubhanshu02 avatar subodhk01 avatar yashjain715 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.