Giter Site home page Giter Site logo

nerds-oppose-society's Introduction

Nerds Oppose Society

Working in a monorepo

This project is managed as a monorepo using npm workspaces. You must initially npm i from the root of the project to properly setup tooling, including git hooks through husky. This will install all required packages of backend, frontend and frontend-v2.

Once installed from the root, be mindful of your current working directory when executing npm commands. npm start will not work in the root; only from backend or frontend. If you wish to not cd into the relevant package, you can use the -w flag like so: npm run -w backend start; this tells npm which package to execute the script in.

Similarly, when installing new packages, the directory you're in will determine if the dependency is added to a particular package or the root. You should avoid installing packages in the root unless you're sure that both the backend and frontend need them.

Basically ensure your terminal is in the right directory when using npm.

Running locally

Database

For full functionality, the frontend and backend must both be run in conjunction with a local mongoDB server. To install mongoDB via Docker:

  1. Install Docker for Desktop and ensure that it's running
  2. Open a terminal and run docker pull mongo
  3. Open Docker for Desktop, navigate to Images, find the mongo:latest image, and click run (play icon)
  4. In the dialog window, open Optional settings and configure as follows: i. Container name: nos-db ii. Host port: 27017 - this must be manually set, don't leave it as 27017/tcp
  5. Click Run

Frontend

The legacy frontend was spun up with create-react-app & Babel. Will eventually be retired.

cd frontend
npm start

Frontend v2

The v2 frontend was spun up with vite & SWC. Freshly in development, not yet at feature parity.

cd frontend-v2
npm dev

Backend

cd backend
npm start

Optional tools

The Conventional Commits standard keeps commits clean and predictable. We like that, but we don't like how it can be tedious and error-prone to write manually. Thankfully, there's a FOSS tool available to structure conventional commits for us.

Simply follow the linked instructions to install better-commits and you can create a commit with better-commits and also branches with better-branch (this enables autofilling of some commit fields). A local config exists in this repo with sensible defaults for commit types and scopes, as well as emojis enabled ๐Ÿ˜Ž

When prompted for a ticket/issue number, feel free to write the GitHub issue number #123 if one exists - if you do this GitHub will understand to link the issue to the PR automatically.

Usage of this tool or the conventional commits standard is not required or enforced, we just like it.

nerds-oppose-society's People

Contributors

taitfuller avatar alxjlv avatar dikunong avatar rawirihohepa 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.