Giter VIP home page Giter VIP logo

micronation's Introduction

Required tools

To run micronation, you will need :

  • NodeJS >= 14.17.3
  • Yarn 1.21 as your package manager
  • A MongoDB database for data storage running on port 27018 for test and 27017 for usual app run (this will be in a .env file soon)

Installation

First, clone the repository with :

git clone https://github.com/Sorikairox/micronation

Install all dependencies by using yarn install in back and front folders.

Copy .env.example content to a .env, .env.test.integration and .env.test.e2e file with your own configuration for each case.

Running the apps

The entire project is meant to be considered as an experiment, thus is made to be visited from the Fouloscopie plateform. As a result, expose the front server on port 3500 and the back one on port 3000 and then visit https://preprod.fouloscopie.com/experiment/1

Back

Microservices are built with NestJS framework and use their scripts.

Before running, library must be built at least once with tsc --build library/tsconfig.json (or cd library && yarn tsc).

  • yarn start:dev to run and watch for changes
  • yarn start to run the app
  • yarn test to run base tests
  • yarn test:integration to run integration tests
  • yarn test:e2e to run end-to-end tests

Front

The Nuxt environnement is being used for the front integration, in addition with yarn scripts.

Go to the front folder and enter yarn to install all the dependencies. Then, start the dev mode with yarn dev or build the entire project with yarn build.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Naming conventions

We use DDD (Domain Driven Design) principles.

Ground rules

  • The entrypoint is named main.ts.
  • Every class must be defined in its own file.
  • Files are named after the class they define (PascalCase). Example: FlagRepository.ts is expected to contain the definition of the FlagRepository class.
  • Files are sorted in folders that make a domain structure. Example: flag/pixel/Pixel.ts is located in the domain pixel which is a subdomain of the domain flag.

Tests

  • Test files are named after the class (PascalCase) or domain (kebab-case) they test and end with .spec.ts, .spec-integration.ts or .spec-e2e.ts. Example: FlagService.spec-integration.ts is expected to contain all integration tests of the FlagService class.
  • Test files are located in a spec folder inside the domain folder they relate to. Example: all tests of stuff in the domain flag are located in flag/spec/.
  • End to end tests are located in the test folder at the root of the module.

License

unlicense

micronation's People

Contributors

sorikairox avatar spicytelescope avatar ashpieboop avatar at-lorlando avatar

Forkers

spicytelescope

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.