mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Improve & update readme's
This commit is contained in:
@@ -8,38 +8,40 @@ The new version is not deployed yet.
|
||||
|
||||
_____
|
||||
|
||||
### Developer documentation :page_with_curl:
|
||||
### Developer documentation
|
||||
|
||||
**Basic commands**
|
||||
**Basic commands** :computer:
|
||||
|
||||
+ `npm run dev`
|
||||
+ Uses `docker-compose.dev.yml`
|
||||
+ Run in development mode: with hot reload
|
||||
+ `npm run check`
|
||||
+ Runs `tsc` and `eslint` for frontend and backend: Use this to check for errors before committing, if you feel like it.
|
||||
+ `npm run start:anon`
|
||||
+ Uses `docker-compose.anon.yml`
|
||||
+ Runs the app with anonymized test-database. Make cypress-tests using this version
|
||||
+ `npm test`
|
||||
+ Runs cypress-tests in headless mode, same as in GitHub Actions. Requires the above command to be ran first.
|
||||
+ `npm run cypress`
|
||||
+ Opens cypress. You can run tests and see what they do.
|
||||
+ `npm start`
|
||||
+ Uses `docker-compose.yml`
|
||||
+ Code is compiled like in production, but using the same local test database as the above command.
|
||||
+ This builds the code and runs it. Mostly you'll want to use this after major technical changes to check the code works also in production mode, before deploying. And then you'll likely want to do: `npm start -- --build` to force rebuild of containers.
|
||||
|
||||
**Further documentation**
|
||||
|
||||
The :open_file_folder: [documentation](documentation)-directory has documentation for developers. Remember to update it if you modify something important like project architecture.
|
||||
:open_file_folder: [Documentation](documentation)-directory has documentation for developers. Remember to update it if you modify something important like project architecture.
|
||||
|
||||
:rocket: [Initialize app & restore db](documentation/init.md)
|
||||
+ How to get the app up & running, and initialize database from sql-dumps
|
||||
:rocket: [Initialize app & restore db](documentation/init.md) How to get the app up & running, and initialize database from sql-dumps
|
||||
|
||||
:wrench: [Technical explanations](documentation/technical_explanations.md)
|
||||
+ Explanations of how things work, and guides for some more rare tasks like generating sequelize models.
|
||||
:wrench: [Technical explanations](documentation/technical_explanations.md) Explanations of how things work, and guides for some more rare tasks like generating sequelize models.
|
||||
|
||||
:raised_hands: [Contributing & integration flow](documentation/contributing.md)
|
||||
+ Where to commit? Where are tests run? How is the code deployed?
|
||||
:raised_hands: [Contributing & integration flow](documentation/contributing.md) Where to commit? Where are tests run? How is the code deployed?
|
||||
|
||||
[Typing the API](documentation/typing.md)
|
||||
+ How to bring types from backend to frontend
|
||||
:nut_and_bolt: [Typing the API](documentation/typing.md) How to bring types from backend to frontend
|
||||
|
||||
:memo: [Frontend](documentation/frontend.md)
|
||||
+ Explanation of the frontend logic and how to add views
|
||||
:memo: [Frontend](documentation/frontend.md) Explanation of the frontend logic and how to add views
|
||||
|
||||
[Validators](frontend/src/validators/)
|
||||
+ The readme explains how validators are written
|
||||
:mag_right: [Validators](frontend/src/validators/) The readme explains how validators are written
|
||||
|
||||
:mag_right: [Class diagram](documentation/class_diagram.md)
|
||||
+ See the relations of relevant tables. Notice that it omits some unimportant tables and does not show most columns.
|
||||
:mag_right: [Class diagram](documentation/class_diagram.md) See the relations of relevant tables. Notice that it omits some unimportant tables and does not show most columns.
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
+ Make commits in some new branches - for example a specific feature. If you make more general changes you can use `development`. Merge/rebase, or make a pull request to main once ready and tests pass.
|
||||
|
||||
**Tests**
|
||||
+ Linting and tsc is ran in GitHub actions on push and pull request to any branch.
|
||||
+ Run locally by doing `npm run lint` and `npx tsc --noEmit` in both `frontend` and `backend` folders.s
|
||||
+ Linting and tsc is ran in GitHub Actions on push and pull request to any branch.
|
||||
+ End-to-end tests are ran in GitHub as well. They use anonymous data.
|
||||
|
||||
**Deployment**
|
||||
+ Code is deployed from `main`. Currently requires building both images in OpenShift manually.
|
||||
+ Code is deployed from `main`. Currently requires building both images in OpenShift manually.
|
||||
|
||||
+3
-3
@@ -6,10 +6,10 @@
|
||||
"scripts": {
|
||||
"start": "docker compose -f docker-compose.yml up",
|
||||
"start:anon": "docker compose -f docker-compose.anon.yml up",
|
||||
"cypress": "cypress open",
|
||||
"test": "cypress run --browser chrome",
|
||||
"check": "echo \"Running frontend tsc ...\" && cd frontend && npx tsc --noEmit && echo \"Running frontend eslint ...\" && npm run lint && cd ../backend && echo \"Running backend tsc ...\" && npx tsc --noEmit && echo \"Running backend eslint ...\"&& npm run lint && echo \"All good! :)\"",
|
||||
"dev": "docker compose -f docker-compose.dev.yml up",
|
||||
"check": "echo \"Running frontend tsc ...\" && cd frontend && npx tsc --noEmit && echo \"Running frontend eslint ...\" && npm run lint && cd ../backend && echo \"Running backend tsc ...\" && npx tsc --noEmit && echo \"Running backend eslint ...\"&& npm run lint && echo \"All good! :)\"",
|
||||
"test": "cypress run --browser chrome",
|
||||
"cypress": "cypress open",
|
||||
"prepare": "husky"
|
||||
},
|
||||
"author": "",
|
||||
|
||||
Reference in New Issue
Block a user