Coder Social home page Coder Social logo

gracekayima04 / boilerplate-for-fp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hackyourfuture-cph/boilerplate-for-fp

0.0 0.0 0.0 2.88 MB

Boilerplate for Final projects

Shell 0.22% JavaScript 88.24% CSS 4.20% HTML 7.22% Procfile 0.12%

boilerplate-for-fp's Introduction

HYF Final project boilerplate

Setup instructions

You can either choose to install the project using a Docker container that comes prepared with the project or you can install your database manually:

With Docker

  1. Install Docker from docker.com
  2. Clone this repository
  3. Run yarn install in the root of the folder to install the dependencies.
  4. cd into the /packages/server folder.
  5. Copy and rename the .env.example file so it is calle .env: cp .env.example .env.
  6. (Optional) update the credentials in the newly created .env. If you skip this step everything should work, but your database will have a generic name and user.
  7. Run this command to build a database with Docker: docker compose up -d. The database will be built based on the values in .env.
  8. Run yarn db:setup to run example migrations and seeds.
  9. Run yarn dev to start the server in development mode.
  10. Navigate to http://localhost:5001/api/exampleResources to verify that the API works and you can read data from the database.

Or without Docker

  1. Install Mysql manually and set up a database dedicated to the project.
  2. Clone this repository and cd into the /packages/server folder.
  3. Copy and rename the .env.example file so it is calle .env: cp .env.example .env.
  4. Update the credentials in the newly created .env and make sure everything matches with the credentials for the database you set up in step (1).
  5. Run yarn db:setup to run example migrations and seeds.
  6. Run yarn dev to start the server in development mode.
  7. Navigate to http://localhost:5001/api/exampleResources to verify that the API works and you can read data from the database.

Yarn commands

NPM commands are replaced with Yarn which provides a faster experience and better organisation of dependencies. Avoid running any npm commands. Below are the most frequently used commands with yarn.

The project is organised as a mono-repository, meaning there is a single project containing a root and two projects (client and server). Remember to keep in mind where you are when running these commands.

Command Description Scope Example
yarn workspaces [command] Run a given command in all workspaces. root yarn workspaces start
yarn workspace [workspace] [command] Run a given command in a dedicated workspace. root yarn workspace client start
yarn or yarn install Equivalent to npm install all
yarn add [package] Equivalent to npm install [package] all
yarn validate Will check if prettier and eslint have been applied correctly to all workspaces. root
yarn format Will run Prettier with the write flag. Only works in the root scope. root
yarn format:check Will run Prettier non-destructively and verify if changes have been applied correctly.
yarn lint Will run Eslint. Can be run in all scopes. root, client, server
yarn knex Allows you to run knex commands. Can be run from root or server, but will always operate on the server. root, server
yarn storybook Runs storybook. client
yarn start Will start either the client or the server. client, server
yarn build Will build a production ready React project. client
yarn storybook-build Will build a production ready Storybook project. client

boilerplate-for-fp's People

Contributors

dpfernandes avatar zkwsk avatar benna100 avatar bytewiz avatar shpomp avatar zoeyzou avatar dependabot[bot] avatar h09shais avatar timnoorlander avatar miltonhultgren avatar moonflare avatar jonathanmh avatar kfazinic avatar martamatos avatar tpetrina 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.