Anonymous job search in IT(public version).
-
Setup environment as described in the doc
-
Clone repository:
git clone [email protected]:mate-academy/huntd-public.git
-
Setup local
.env
file
- Run
make init
to copy.env.sample
->.env
- Insert on the 4th line the NPM_TOKEN you were given
-
Install dependencies (node modules) for primary services locally:
Use install script in the root of the project
node install
OR manually
npm install # in root, ./frontend, ./api, ./cms
-
Add certificates to trusted
- Check Nginx Readme
To run the project run following command in the root directory(INSERT NPM TOKEN INTO MAKEFILE BEFORE RUNNING IT):
make up
After project has started up it should be accessible at https://local.huntd.tech
Project contains following services combined in docker-compose
:
-
API:
- Codebase: './api'
- Graphql endpoint:
https://local.huntd.tech/graphql
- Rest endpoint:
https://local.huntd.tech/rest
Graphql is a primary endpoint to use. Rest api is needed only for services without graphql support (like receive a pingback from the oAuth provider).
Useful guides to learn how graphql works in combination with ORM and UI:
-
Frontend:
- Codebase: './frontend'
- Homepage:
https://local.huntd.tech
NextJS is used for serving UI on Huntd. Complete official guide and read the docs to get familiar with NextJS features.
-
CMS:
- Codebase: './cms'
- Homepage:
https://local.hutnd.tech/admin
Strapi is used as a CMS on Huntd. Read official docs to get familiar with strapi features.
On Huntd it's possible to use Typescript in Strapi while developing custom plugins even despite TS is not supported officially.
-
NGINX:
- Codebase: './nginx'
Reverse proxy server. Read the docs to get familiar with nginx features.
Follow guide from Nginx readme to setup SSL certificates locally
-
DB:
- Codebase: './db'
Local postgres database
-
Redis:
Huntd uses Redis as a PubSub server. Read the docs to get familiar with Redis features.
In production Huntd project uses AWS Redis.
Makefile is useful for running project locally. Most of the time developers use following commands:
make
ormake up
- start projectmake down
- stop projectmake rebuild-hard s=<service>
- rebuild image. Useful after installing new packages/dependencies.make test s=<service>
- run testsmake db-development
- connect to databasemake clean
- clean docker resources. Useful when messageNo space left on the device
appeared.
- Rebuild service every time when new dependency added. The
node_modules
folder is not synced to the docker container for performance purposes, so the only way to get dependencies in the container is running the "rebuild" command.make rebuild-hard s=<service>
- Keep local
.env
in sync with.env.sample
.