Skip to content

Commit c42dff3

Browse files
authored
Merge pull request #70 from infinum/readme-template
Add readme template
2 parents 2cdcf07 + 25916eb commit c42dff3

File tree

1 file changed

+126
-0
lines changed

1 file changed

+126
-0
lines changed

README.template.md

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# [TODO:PROJECT_NAME]
2+
3+
[TODO:PROJECT_DESCRIPTION]
4+
5+
- [Setup](#setup)
6+
- [Prerequisites / Dependencies](#prerequisites--dependencies)
7+
- [Installation](#installation)
8+
- [Post-install](#post-install)
9+
- [Usage](#usage)
10+
- [Running the app](#running-the-app)
11+
- [Building the app](#building-the-app)
12+
- [Testing](#testing)
13+
- [Unit testing](#unit-testing)
14+
- [End to end tests](#end-to-end-tests)
15+
- [Code quality](#code-quality)
16+
- [Environments](#environments)
17+
- [Environment variables \[TODO: Remove non-applicable\]](#environment-variables-todo-remove-non-applicable)
18+
- [React](#react)
19+
- [Angular](#angular)
20+
- [List of environment variables](#list-of-environment-variables)
21+
- [Deployment](#deployment)
22+
- [Releases](#releases)
23+
- [Translations](#translations)
24+
25+
## Setup
26+
27+
### Prerequisites / Dependencies
28+
29+
You will need to have NodeJS and NPM installed to run this application. Use the [handbook guide](https://infinum.com/handbook/frontend/node/managing-node-npm-versions) to set up the correct NodeJS version.
30+
31+
### Installation
32+
33+
1. clone this repository: `git clone [TODO:GIT_LINK]`
34+
2. install all the dependencies: `npm ci`
35+
36+
### Post-install
37+
38+
1. set up the [environment variables](#environment-variables)
39+
40+
## Usage
41+
42+
### Running the app
43+
44+
To run the app, you can simply run `[TODO:NPM_START_COMMAND]`. This starts the application in the environment dependent on your environment setup.
45+
46+
### Building the app
47+
48+
To build the app you can use some of the following commands:
49+
50+
```
51+
npm run build
52+
53+
# TODO: development and production builds if applicable
54+
# npm run build:dev
55+
# npm run build:prod
56+
57+
```
58+
59+
## Testing
60+
61+
### Unit testing
62+
63+
To start the unit tests you can use one of the following commands:
64+
65+
```
66+
npm run test
67+
npm run test:watch
68+
npm run test:coverage
69+
70+
```
71+
72+
### End to end tests
73+
74+
[TODO:DESCRIBE_E2E]
75+
76+
### Code quality
77+
78+
The following tools are used in the project to ensure code quality:
79+
80+
Prettier: for consistent code formatting.
81+
ESLint: for identifying and fixing code quality issues.
82+
Husky: Git hooks to automate code quality checks with ESLint and Prettier
83+
84+
Local code quality checks (Prettier, ESLint) are run before a user can commit their code through Husky's _pre-commit_ hook, which ensures that the code pushed to Git is consistent and doesn't include any obvious issues that can be detected with static analysis.
85+
86+
## Environments
87+
88+
There are currently two application environments:
89+
90+
1. DEV - development instance, used for testing developed features
91+
- API: [TODO:DEV_BACKEND_API_URL]
92+
- Frontend: [TODO:DEV_APP_URL]
93+
2. PRODUCTION - production environment
94+
- API: [TODO:PROD_BACKEND_API_URL]
95+
- Frontend: [TODO:PROD_APP_URL]
96+
97+
## Environment variables [TODO: Remove non-applicable]
98+
99+
### React
100+
101+
You can specify your environment variables in the `.env` file based on `.env.example`.
102+
103+
### Angular
104+
105+
You can specify environment variables as per the guide in the [Nuts & Bolts](https://infinum.github.io/ngx-nuts-and-bolts/docs/environment-variables).
106+
107+
### List of environment variables
108+
109+
| Variable | Requirement | Description |
110+
| ---------------- | ----------- | ---------------------------------------------------------- |
111+
| API_HOST | required | API endpoint URL |
112+
| ENV | required | Available options: development, production |
113+
114+
## Deployment
115+
116+
The application deployment is managed with GitHub Actions.
117+
118+
More information on the deployment process can be found in [Deployment process wiki page](TODO:GITHUB_WIKI_PAGE).
119+
120+
## Releases
121+
122+
Releases are handled through GitHub Releases feature and documentation for it can be found on [Release process wiki page](TODO:GITHUB_WIKI_PAGE).
123+
124+
## Translations
125+
126+
The application uses [Polyglot](TODO:PROJECT_POLYGLOT_LINK) for handling translations. More information can be found on the [Translations handling wiki page](TODO:GITHUB_WIKI_PAGE).

0 commit comments

Comments
 (0)