docs: Suggest clearer ReadMe for collaborators

This commit is contained in:
Simon Pistache 2023-10-13 19:10:31 +02:00 committed by forceoranj
parent cbcc7e5c79
commit 168d64dcf0
2 changed files with 41 additions and 84 deletions

BIN
.github/screenshot.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

125
README.md
View File

@ -1,107 +1,64 @@
# <b>Intranet of the <i>Paris est Ludique</i> board game festival.</b> # _Paris est Ludique!_'s Intranet
<i>This is the intranet used by the volunteers of the assosication Paris est Ludique.</i><br> This project host the source code for Force Orange, the intranet used by the volunteers of the french assocication Paris est Ludique!
It is built from the boilerplate [React Cool Starter](https://github.com/wellyshen/react-cool-starter), on the top of [React](https://facebook.github.io/react), [Redux](https://github.com/reactjs/redux), [React Router](https://reacttraining.com/react-router) and [Express](https://expressjs.com). It is built from the boilerplate [React Cool Starter](https://github.com/wellyshen/react-cool-starter), on top of [React](https://facebook.github.io/react), [Redux](https://github.com/reactjs/redux), [React Router](https://reacttraining.com/react-router), [Express](https://expressjs.com), [Yarn](https://yarnpkg.com/), [webpack](https://webpack.js.org/) and [Babel](https://babeljs.io/).
## Requirements ![Illustration of the website](.github/screenshot.png)
## Contributing
### Onboarding
This project is open to contribution, but you will likely need to be in touch with us in order to collaborate efficiently. Contact Paris Est Ludique via our official Website then join the Discord. You will need to get:
- Access to a database sample to place in `./access/dbToLoad.json`
- Access to our [Trello Issue trackerd](https://trello.com/b/5oKGdc1K/intranet-pel-2022)
### Requirements
- An account on GitHub
- [git](https://git-scm.com/)
- [node](https://nodejs.org/en) >= 12.0 - [node](https://nodejs.org/en) >= 12.0
- [npm](https://www.npmjs.com) >= 6.0 - [npm](https://www.npmjs.com) >= 6.0
- On MacOS, [HomeBrew](https://brew.sh/) is recommanded
- An IDE of your choice. We suggests:
- [Atom](https://atom.io/) with [TypeScript plugin](https://atom.io/packages/ide-typescript)
- [Visual Studio Code](https://code.visualstudio.com/)
- [Webstorm 2018.1](https://www.jetbrains.com/webstorm/download/)
- [Sublime Text](http://www.sublimetext.com/3) with [Typescript-Sublime-Plugin](https://github.com/Microsoft/Typescript-Sublime-plugin#installation)
## Getting Started ### Setup
**1. You can start by cloning the repository on your local machine by running:** Using a terminal:
```sh ```bash
# Clone this repository on your computer
git clone https://github.com/forceoranj/intranet.git git clone https://github.com/forceoranj/intranet.git
cd intranet cd intranet
```
**2. Install all of the dependencies:** # Install dependencies using YARN
npm install --legacy-peer-deps
```sh brew install corepack # If not included in your npm
npm install yarn corepack enable
yarn yarn
```
**3. Start to run it:** # Include the database
mv ~/Downloads/database-sample.json ./access/dbToLoad.json
```sh # Start your local server
yarn dev # Build, hosts, and hot reload saved modifications yarn dev # Build, hosts, and hot reload saved modifications
``` ```
Now the app should be running at [http://localhost:3000](http://localhost:3000) Now the app should be serving at <http://localhost:3000>.
## File editors ### Contribution rules
Edit files with one of these HTML/CSS/TypeScript editors: We stick to the [GitHub Flow workflow](https://docs.github.com/en/get-started/quickstart/github-flow)
- [Atom](https://atom.io/) with [TypeScript plugin](https://atom.io/packages/ide-typescript) - Commiting to the main branch is forbidden. Make use of topic branches to change code.
- [Visual Studio Code](https://code.visualstudio.com/) - PR names should follow the [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/#summary) (`fix(#x)`, `feat(#y)`, `refactor(#z)`, …)
- [Webstorm 2018.1](https://www.jetbrains.com/webstorm/download/) - PR should relate to an issue on our Issue Tracker, either our [Trello board](https://trello.com/b/5oKGdc1K/intranet-pel-2022) or this project one.
- [Sublime Text](http://www.sublimetext.com/3) with [Typescript-Sublime-Plugin](https://github.com/Microsoft/Typescript-Sublime-plugin#installation) - You can fork the repository on your space and PR from there, but this is not mandatory.
## Script Commands
I use [cross-env](https://github.com/kentcdodds/cross-env) to set and use environment variables across platforms. All of the scripts are listed as following:
| `yarn <script>` | Description |
| ---------------- | ---------------------------------------------------------------------------------- |
| `dev` | Runs your app on the development server at `localhost:3000`. HMR will be enabled. |
| `dev:build` | Bundles server-side files in development mode and put it to the `./public/server`. |
| `start` | Runs your app on the production server only at `localhost:8088`. |
| `build` | Bundles both server-side and client-side files. |
| `build:server` | Bundles server-side files in production mode and put it to the `./public/server`. |
| `build:client` | Bundles client-side files in production mode and put it to the `./public/assets`. |
| `analyze:server` | Visualizes the bundle content of server-side. |
| `analyze:client` | Visualizes the bundle content of client-side. |
| `lint` | Lints all `.tsx?`, `.jsx?` and `.scss` files. |
| `lint:code` | Lints all `.tsx?` and `.jsx?` files (With `--fix` to auto fix eslint errors). |
| `lint:type` | Runs type checking for `.tsx?` files. |
| `lint:style` | Lints all `.scss` files (With `--fix` to auto fix stylelint errors). |
| `lint:format` | Formats all files except the file list of `.prettierignore`. |
| `test` | Runs testing. |
| `test:watch` | Runs an interactive test watcher. |
| `test:cov` | Runs testing with code coverage reports. |
| `test:update` | Updates jest snapshot. |
## App Structure
Here is the structure of the app, which serves as generally accepted guidelines and patterns for building scalable apps.
```
.
├── public # Express server static path and Webpack bundles output
│ ├── favicon.ico # App favicon
│ ├── logo192.png # App logo small
│ ├── logo512.png # App logo large
│ └── manifest.json # App favicon and logo manifest
├── src # App source code
│ ├── config # App configuration by environments
│ │ ├── default.ts # Default settings
│ │ ├── index.ts # Configuration entry point
│ │ └── prod.ts # Production settings (overrides the default)
│ ├── components # Reusable components
│ ├── pages # Page components
│ ├── app # App root component
│ ├── store # Redux store creator, actions + reducers (a.k.a slice)
│ ├── services # API calls
│ ├── utils # App-wide utils (e.g. mock store creator for testing etc.)
│ ├── static # Static assets (e.g. images, fonts etc.)
│ ├── theme # App-wide style and vendor CSS framework
│ ├── types # App-wide type definitions
│ ├── client # App bootstrap and rendering (Webpack entry)
│ ├── routes # Routes configuration for both client-side and server-side
│ └── server # Express server (with Webpack dev and hot middlewares)
├── webpack # Webpack configurations
├── jest # Jest configurations
├── babel.config.js # Babel configuration
├── tsconfig.json # TypeScript configuration
├── postcss.config.js # PostCSS configuration
├── .eslintrc.js # ESLint configuration
├── .stylelintrc.js # stylelint configuration
└── nodemon.json # nodemon configuration
```
## Contributors ✨ ## Contributors ✨