A platform for internal tools at Coding Blocks, hosted at https://tools.codingblocks.com. This project is part of boss, please check for issues here. For any queries regarding setup or contribution, feel free to join discord and post in #gondor channel.
yarnFollow the postgresql guidelines, download an install postgres v9.6.
Create Database
psql -U postgres
> create database gondor;
> \qUpdate Env Vars
touch .env
#.env
DB_HOST=127.0.0.1 #optional
DB_USERNAME=postgres #or any other postgres username
DB_NAME=gondor #optional
DB_PASSWORD= #postgres user password if anyRun Migrations
yarn sequelize db:migrateThis project uses OneAuth as a single sign on server. For authentication it is required for OneAuth to be either running locally or to have a client application created here.
(optional) Please follow the instructions here to setup up OneAuth locally.
Config for OneAuth Client App
domain = http://localhost:3000
default url = http://localhost:3000
callback url = http://localhost:3000/api/login/callback
If you have setup OneAuth locally, then create a client application, get the ONEAUTH_CLIENT_ID & ONEAUTH_CLIENT_SECRET and add it to your .env.
Otherwise, similarly create a client application for authentication here, get the ONEAUTH_CLIENT_ID & ONEAUTH_CLIENT_SECRET and add it to your .env.
Add Env Vars
#.env
ONEAUTH_URL=http://localhost:3838 #include only if oneauth setup locally
ONEAUTH_CLIENT_SECRET=<client_id>
ONEAUTH_CLIENT_SECRET=<client_scret>yarn devOpen http://localhost:3000 with your browser to see the result.
Take a look at the following resources:
- Next.js Documentation - learn about Next.js features.
- Graphql - learn graphql specification.
- Apollo Server - learn about graphql api server.
- Apollo Client - learn about graphql react client.
- DataLoader - learn how to fix N+1 query problem.
- ReactStrap - learn bootstrap components for react.