Skip to content

Commit 2aed7e7

Browse files
authored
Merge pull request #619 from dzcode-io/chore/house-keeping
2 parents 1b9d79e + 7644873 commit 2aed7e7

File tree

12 files changed

+111
-110
lines changed

12 files changed

+111
-110
lines changed

.github/ISSUE_TEMPLATE/question.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Question
3-
about: The issue tracker is not for questions. Please use email [email protected] or other social links for help/questions.
3+
about: The issue tracker is not for questions. Please use Discord or other social channels for help or questions.
44
labels: question
55
---
66

@@ -10,12 +10,12 @@ THE ISSUE TRACKER IS NOT FOR QUESTIONS.
1010
1111
DO NOT CREATE A NEW ISSUE TO ASK A QUESTION.
1212
13-
Please use one of the following resources for help:
13+
Please use one of the following resources for help or questions:
1414
1515
**Questions**
1616
17+
- https://discord.gg/TGbPsSMJC2
1718
- https://github.com/dzcode-io/dzcode.io/discussions/new?category=q-a
18-
- https://dzcode.slack.com/
1919
- https://twitter.com/dzcode_io
2020
- https://www.facebook.com/dzcode.io
2121
- https://www.facebook.com/groups/dzcode.io

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
<!-- Hi, Thank you for your contribution 🔥
1+
<!-- Hi, thank you for your contribution! 🔥
22
3-
Please write a high-level description of the changes made by your pull request and if
4-
possible include references to related GitHub issues and other pull requests, for example:
3+
Please provide a high-level description of the changes made by your pull request. If possible, reference related GitHub issues or other pull requests. For example:
54
65
Fixes #123
76
Resolves #254
87
See also #23
98
109
-->
1110

12-
#### Type of change
11+
<!-- After creating your PR, please check the relevant options below -->
1312

14-
<!-- After your PR is created, please tick the relevant options below -->
15-
16-
- [ ] Bug fix (non-breaking change which fixes an issue)
17-
- [ ] New feature (non-breaking change which adds functionality)
18-
- [ ] Breaking change (changes that require a fresh clone of the repo)
19-
- [ ] I'm not sure
13+
- [ ] Bug fix
14+
- [ ] New feature
15+
- [ ] Other

.github/release-drafter.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
name-template: "stg-v$RESOLVED_VERSION"
2-
tag-template: "stg-v$RESOLVED_VERSION"
3-
tag-prefix: "stg-v"
4-
include-pre-releases: true
5-
prerelease: true
1+
# This file drafts a release (e.g.: v6.1.2) each time a PR is merged
2+
# Used by: .github/workflows/draft-new-release.yml
3+
4+
name-template: "v$RESOLVED_VERSION"
5+
tag-template: "v$RESOLVED_VERSION"
6+
tag-prefix: "v"
67
change-template: "- $TITLE (#$NUMBER)"
78
version-resolver:
89
major:
@@ -11,15 +12,14 @@ version-resolver:
1112
minor:
1213
labels:
1314
- "feature"
15+
- "enhancement"
1416
default: patch
1517
template: |
16-
deploying `main` branch to stage:
17-
18-
$CHANGES
18+
[www.dzcode.io](https://www.dzcode.io)
1919
20-
To test on `stage` environment go to:
20+
Join us on [Discord](https://discord.gg/TGbPsSMJC2)
2121
22-
- [stage.dzcode.io](https://stage.dzcode.io)
22+
$CHANGES
2323
2424
autolabeler:
2525
- label: "breaking-change"

.github/release.yml

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,29 @@
1+
# This file is used by GitHub when clicking on "Generate Release Notes" in the "Releases" tab.
2+
# We try to align its content with .github/release-drafter.yml.
3+
# Used in case of manual release creation.
4+
15
changelog:
26
categories:
3-
- title: Features 🎉
4-
labels:
5-
- feature
6-
7-
- title: Breaking Changes 🚨
7+
- title: Breaking Changes
88
labels:
99
- breaking-change
1010

11-
- title: Enhancements 💅
11+
- title: Features
1212
labels:
13+
- feature
1314
- enhancement
1415

15-
- title: Bug fixes 🐞
16+
- title: Bug fixes
1617
labels:
1718
- bug
1819
- bug-fix
1920
- bugfix
2021
- fix
2122

22-
- title: Projects 🚀
23+
- title: Projects
2324
labels:
2425
- project
2526

26-
- title: Articles 📰
27-
labels:
28-
- article
29-
30-
- title: Documentation 📜
31-
labels:
32-
- documentation
33-
3427
- title: Other Changes
3528
labels:
3629
- "*"
File renamed without changes.

.github/workflows/stage-release.yml renamed to .github/workflows/draft-new-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
# Drafts your next Release notes as Pull Requests are merged into "master"
29+
# TODO-ZM: update the latest version of the action
2930
- uses: release-drafter/release-drafter@v5
3031
env:
3132
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 19 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
# dzcode.io
22

3-
[<img src="http://img.shields.io/badge/Join%20us%20on%[email protected]?logo=slack">](https://join.slack.com/t/dzcode/shared_invite/zt-ek9kscb7-m8z_~cBjX79l~uchuABPFQ)
3+
[![Discord](https://img.shields.io/discord/1290374838627602483)](https://discord.gg/TGbPsSMJC2)
44

5-
The code for [dzcode.io](https://dzcode.io), a website for Algerian open-source community.
5+
The code for [dzcode.io](https://dzcode.io), a website for the Algerian open-source community.
66

77
**Apps:**
88

9-
- [`./web`](./web) ( [dzcode.io](https://dzcode.io) or [stage.dzcode.io](https://stage.dzcode.io) )
10-
- lighthouse results are in: [lh.dzcode.io](https://lh.dzcode.io) and [lh-stage.dzcode.io](https://lh-stage.dzcode.io)
11-
- [`./api`](./api) ( [api.dzcode.io](https://api.dzcode.io) or [api-stage.dzcode.io](https://api-stage.dzcode.io) )
9+
- [`./web`](./web) ([dzcode.io](https://dzcode.io) or [stage.dzcode.io](https://stage.dzcode.io))
10+
- [`./api`](./api) ([api.dzcode.io](https://api.dzcode.io) or [api-stage.dzcode.io](https://api-stage.dzcode.io))
1211

13-
**Packages**
12+
**Packages:**
1413

1514
- [`./data`](./data)
1615
- [`./packages/models`](./packages/models)
@@ -19,26 +18,26 @@ The code for [dzcode.io](https://dzcode.io), a website for Algerian open-source
1918

2019
## Get Started
2120

22-
### Perquisites
21+
### Prerequisites
2322

2423
Make sure you have:
2524

2625
- [Git](https://git-scm.com/)
27-
- [Nodejs](https://nodejs.org/) version 20 or higher (we recommend using [volta](https://docs.volta.sh/guide/getting-started) over plain install or [nvm](https://github.com/nvm-sh/nvm))
26+
- [Node.js](https://nodejs.org/) version 20 or higher (we recommend using [volta](https://docs.volta.sh/guide/getting-started) over a plain install or [nvm](https://github.com/nvm-sh/nvm))
2827
- [Docker](https://www.docker.com/) installed and running.
2928

3029
### Run it locally
3130

32-
- Open terminal and clone the repo:
31+
- Open a terminal and clone the repo:
3332

3433
```sh
35-
git clone https://github.com/dzcode-io/dzcode.io.git
34+
git clone https://github.com/dzcode-io/dzcode.io.git
3635
```
3736

3837
- Make **sure** you are in the project **root**:
3938

4039
```sh
41-
cd dzcode.io
40+
cd dzcode.io
4241
```
4342

4443
- Install dependencies:
@@ -47,46 +46,21 @@ Make sure you have:
4746
npm install
4847
```
4948

50-
- Run it locally by either:
51-
52-
```sh
53-
npm run dev:web
54-
```
55-
56-
```sh
57-
npm run dev:api
58-
```
49+
- Run it locally:
5950

6051
```sh
6152
npm run dev:all
6253
```
6354

64-
- For api server go to <http://localhost:7070>
65-
- For web server go to <http://localhost:8080>
66-
- For search server go to <http://localhost:7700>
67-
68-
**Note**
69-
70-
In [`./api`](./api), keep in mind that you have limited calls to Github Api (60 calls per hour), the [FetchService](./api/src/fetch/service.ts) is doing a great job at caching theses calls so it doesn't unnecessarily consume Github API quota. If you wish to extend the limit from 60 to 5000, simply create a [Github Personal Access Token](https://github.com/settings/tokens) (make sure it has `Access public repositories` checked), and set it in `./api/.env` like this:
55+
- For the API server, go to <http://localhost:7070>
56+
- For the web server, go to <http://localhost:8080>
57+
- For the search server, go to <http://localhost:7700>
7158

72-
```.env
73-
GITHUB_TOKEN=Paste_You_Token_Here
74-
NODE_ENV=development
75-
```
76-
77-
### Run e2e locally
78-
79-
Make **sure** you are in the project **root**, then:
80-
81-
- run web e2e tests by:
82-
83-
```sh
84-
cd web && npm run e2e:dev
85-
```
59+
Please check the README.md files inside `./api` and `./web` for more info.
8660

8761
## Contributing
8862

89-
To get started see [the contributing guidelines](https://github.com/dzcode-io/dzcode.io/blob/main/.github/CONTRIBUTING.md).
63+
To get started, see [the contributing guidelines](https://github.com/dzcode-io/dzcode.io/blob/main/.github/CONTRIBUTING.md).
9064

9165
If you use VSCode, please make sure to have a `.vscode/settings.json` file with the content:
9266

@@ -107,13 +81,13 @@ If you use VSCode, please make sure to have a `.vscode/settings.json` file with
10781

10882
### Before You Create a Pull Request
10983

110-
- If you already forked the repository, please make sure your fork is up-to-date, following [this simple steps](https://www.dzcode.io/Learn/Git_Basics/Syncing_An_Old_Forked_Repository_With_Upstream).
111-
- Please make sure your code follows the style guideline defined in this repo, for that simply run `npm run lint:fix` to ensure the conformity. This process should happen automatically whenever you commit your changes, but you can always do it manually when your Pull Request checks are failing due to linting errors.
84+
- If you already forked the repository, please make sure your fork is up-to-date by following [these simple steps](./data/models/documentation/Git_Basics/Syncing_An_Old_Forked_Repository_With_Upstream/content.md).
85+
- Please make sure your code follows the style guidelines defined in this repo. Simply run `npm run lint:fix` to ensure conformity. This process should happen automatically whenever you commit your changes, but you can always do it manually if your Pull Request checks are failing due to linting errors.
11286

11387
### List Your Project
11488

11589
Follow [these steps](https://github.com/dzcode-io/dzcode.io/blob/main/data/models/documentation/About_dzcode_io/Add_Your_Project_To_dzcode_io/content.md).
11690

11791
## License
11892

119-
Licensed under the MIT license (twitter: [@dzcode_io](https://twitter.com/dzcode_io)).
93+
Licensed under the MIT license (Twitter: [@dzcode_io](https://twitter.com/dzcode_io)).

api/README.md

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,30 @@
22

33
## Folder structure
44

5-
The app is split into modules, each module (any folder directly under `api/src`) can have service(s) and/or controller(s)
5+
The app is split into modules. Each module (any folder directly under `api/src`) can have service(s) and/or controller(s).
66

7-
- example of a service is [./src/github/service.ts](./src/github/service.ts)
8-
- example of a controller is [./contributor/controller.ts](./contributor/controller.ts)
9-
10-
There is still temporary old code inside:
11-
12-
- [./src/app/controllers](./src/app/controllers)
13-
- [./src/app/loaders](./src/app/loaders)
14-
- [./src/app/routes](./src/app/routes)
15-
- [./src/app/services](./src/app/services)
7+
- An example of a service is [./src/github/service.ts](./src/github/service.ts).
8+
- An example of a controller is [./contributor/controller.ts](./contributor/controller.ts).
169

1710
## Dependency injection
1811

19-
We use typedi for dependency injection, please check their docs.
12+
We use typedi for dependency injection. Please check their documentation.
2013

2114
We use it in both services and controllers.
2215

23-
**Note:** if the readme is still unclear, please create a PR with your suggested changes/additions
16+
## The `.env` file
17+
18+
At a minimum, you need a `.env` file with this content:
19+
20+
```.env
21+
NODE_ENV=development
22+
```
23+
24+
Keep in mind that you have limited calls to the GitHub API (60 calls per hour). The [FetchService](./api/src/fetch/service.ts) does a great job of caching these calls so it doesn't unnecessarily consume the GitHub API quota. If you wish to extend the limit from 60 to 5000, simply create a [GitHub Personal Access Token](https://github.com/settings/tokens) (make sure it has `Access public repositories` checked), and set it in `./api/.env` like this:
25+
26+
```.env
27+
GITHUB_TOKEN=Paste_Your_Token_Here
28+
NODE_ENV=development
29+
```
30+
31+
**Note:** If the README is still unclear, please create a PR with your suggested changes/additions.

data/models/documentation/Getting_Started/content.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ So, you already master or have enough knowledge about a specific topic in IT? yo
2424

2525
## Have Other general suggestions?
2626

27-
Feel free to reach out to [[email protected]](mailto:[email protected]) or create an issue in [dzcode.io repository](https://github.com/dzcode-io/dzcode.io), or chat with the community members on [Slack workspace](https://join.slack.com/t/dzcode/shared_invite/zt-ek9kscb7-m8z_~cBjX79l~uchuABPFQ).
27+
Feel free to reach out to [[email protected]](mailto:[email protected]) or create an issue in [dzcode.io repository](https://github.com/dzcode-io/dzcode.io), or chat with the community members on [Discord](https://discord.gg/TGbPsSMJC2).
2828

2929
Have fun!

web/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Web code
2+
3+
## Folder structure
4+
5+
The app is split into main folders inside `./src`:
6+
7+
- `./components`: reusable React components
8+
- `./pages`
9+
- `./redux`: contains slices (reducers and actions), and async actions
10+
11+
Then there are additional folders:
12+
13+
- `./utils`: miscellaneous code
14+
- `./assets`: non-code files
15+
- `_*` folders: boilerplate code
16+
17+
## State management
18+
19+
We use Redux Toolkit, but only the "Redux" part. Please check their documentation.
20+
21+
## Run e2e locally
22+
23+
Make **sure** you have already run `npm run dev:all` at the root of the repo, then in a separate terminal run:
24+
25+
```sh
26+
npm run e2e:dev
27+
```
28+
29+
**Note:** If the README is still unclear, please create a PR with your suggested changes/additions.

0 commit comments

Comments
 (0)