Skip to content

KexunNiu/Pathfinder2

Repository files navigation

Pathfinder-2

Running tests Deploy static Publish docs via GitHub Pages

Pathfinder ver. 2 (Skillcity Institute) [CSL] is a platform designed to:

  • allow clients to post opportunities (training, apprenticeships, jobs, scholarships, etc)
  • connect young people/students to activities and opportunities within the city

Contributors

Fall 2022:

  • Andrew Li
  • Marc-Andre Haley
  • Meilin Lyu
  • Rahul Singh Bains
  • Aryan Malik
  • Simiao Zheng

Winter 2023:

  • Aryan Kalwani
  • Filippo Ciandy
  • Iris Du
  • John Goodliff
  • Kexun Niu
  • Wenhao Cao

License

TBD (closed sourced?)


Links

Documentation: here

Screencast: here

Frontend deployment: here

Backend deployment: here

API Docs: here

Figma: here


Next.js-Django Template

License: MIT Support me on GitHub

Boilerplate for a Next.js Django app

Requirements

  • nvm
  • node
  • yarn
  • Docker
  • Docker-compose
  • Make
  • next
  • cypress

Running Locally

To run development locally from scratch run make init then do make up if it is not running already. (If you are on Windows, you may also need to add aliases to C:\Windows\System32\drivers\etc\hosts (see make hosts)). Now everything should be running on platform.pathfinder.test if you did the previous steps correctly. To stop the containers do make down

Frontend

Next.js app with BEM SCSS using JS (TS is overkill for frontend and unit tests are meaningless till at least MVP)

See platform.pathfinder.test if you added to /etc/hosts (if you are on windows see Windows)

front.png


Dependencies

To add dependencies, do make frontend-add package=<named-of-package>

Development

To run development first install dependencies with make init then do make up

Backend

See api.platform.pathfinder.test if you added to /etc/hosts (if you are on Windows you may also need to add aliases to C:\Windows\System32\drivers\etc\hosts)

Django backend with logger, email, unit tests

Testing

When testing email use mail.platform.pathfinder.test to get the mailhog client to catch mail

Admin

If you want to make a superuser do make createsuperuser and that will create an admin with login credentials of the following:

Username: admin Password: admin


Add App

To add an app to the backend, do make new-app app=<named-of-app>

⚠ When starting a new app you might get errors inf they are not installed locally, in which case comment out dependencies in INSTALLED_APPS in settings.py

Dependencies

To add dependencies, do make backend-add package=<named-of-package>

Migrations

If you change or create model entities, you will need to generate migrations for the DB. Simply run make migrations or make migrations name=migration-name app=app-name for a named migration where app-name will corresponding to the app where the model was changed. If you do not do this, then your entity changes will not be reflected in the database.

API documentation

The API documentation can be seen at /swagger/ for swagger version

DevOps

Docker, Docker-compose, Makefiles, Traefik for proxy handling

To start off do make init or do make up if you are starting it up again

To bring the services down do make down

Testing

Unit testing for backend and cypress testing for e2e. To run e2e do make e2e (unfortunately this does not work on WSL) Django unit tests can be run using make unit and front end tests can be run with make unit-f

TODOS

Here are a list of things you need to do once you decide to use this template

Recommendations

  • use djoser for fast django auth
  • set up CI/CD for testing

Development Workflow

Branches

Main should be the production env while dev branch is pre-production. Any other feature or bug can be added as a new branch in the format of project name followed by the ticket number (ie NDT-00401)

PRs

PRs likewise should have project name followed by the ticket number and optionally include the epic it is a part of. In addition a description should be included

Example: NDT-00401(MVP): Finished frontend as part of the MVP

Where MVP is the current epic

Support

With inspiration from github.com/vintasoftware/django-react-boilerplate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published