townhallproject / admin

Front end admin site
MIT License
0 stars 10 forks source link

💻 Developer environment setup: 💻

The below guide will take you through the steps of downloading the project files and setting up the online database (Google Firebase). In the future, there will be an easier process hooking into a pre-configured database.

This setup process is fairly lengthy, but it's not too bad if you stick with it! Also, to make sure it gets easier for future developers, make sure to write down or edit this readme with any errors you come across! This will make it easier for future developers to get started on the project!

Good luck!


0. Before you start

The general development workflow is as follows:

Merging your changes to the main THP repo

  1. update your forked master branch to match the main THP master branch:
  1. Rebase your topic branch onto your fork's master, which is now up to date with everyone elses changes:
  1. Create a pull request to the main THP repo master

1. Download the files


2. Setting up Firebase

Set up Firebase OAuth

Set up the OAuth consent screen


3. Setting up your Firebase user

Try starting the app npm start in the terminal (from the project root directory). This should open a web browser pointed at: http://localhost:3000 prompting you to log in the view the admin site.

You should expect to get an error at this point. Read it carefully.

If everything has gone according to plan so far you should get the following error:

USER_REQUEST_FAILED: Error: permission_denied at /users/<some long string>: Client doesn't have permission to access the desired data.

This indicates that you are not a user who has permissions on Firebase. Make yourself a user with the following steps:


4. Setting the Firebase rules

This step makes your testing database behave the same as the production database, which is important for discovering bugs in your fresh code.


5. Devtools setup

React and Redux devtools can be helpful tools to install for debugging in Chrome:


6. 🎂 Congratulations you're done 🎂

When you encounter new problems, make SURE to edit this README with updated information so that future coders can spend more time being productive!