Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Question
about: The issue tracker is not for questions. Please use email contact@dzcode.io or other social links for help/questions.
about: The issue tracker is not for questions. Please use Discord or other social channels for help or questions.
labels: question
---

Expand All @@ -10,12 +10,12 @@ THE ISSUE TRACKER IS NOT FOR QUESTIONS.

DO NOT CREATE A NEW ISSUE TO ASK A QUESTION.

Please use one of the following resources for help:
Please use one of the following resources for help or questions:

**Questions**

- https://discord.gg/TGbPsSMJC2
- https://github.com/dzcode-io/dzcode.io/discussions/new?category=q-a
- https://dzcode.slack.com/
- https://twitter.com/dzcode_io
- https://www.facebook.com/dzcode.io
- https://www.facebook.com/groups/dzcode.io
Expand Down
16 changes: 6 additions & 10 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
<!-- Hi, Thank you for your contribution 🔥
<!-- Hi, thank you for your contribution! 🔥

Please write a high-level description of the changes made by your pull request and if
possible include references to related GitHub issues and other pull requests, for example:
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:

Fixes #123
Resolves #254
See also #23

-->

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

<!-- After your PR is created, please tick the relevant options below -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (changes that require a fresh clone of the repo)
- [ ] I'm not sure
- [ ] Bug fix
- [ ] New feature
- [ ] Other
20 changes: 10 additions & 10 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name-template: "stg-v$RESOLVED_VERSION"
tag-template: "stg-v$RESOLVED_VERSION"
tag-prefix: "stg-v"
include-pre-releases: true
prerelease: true
# This file drafts a release (e.g.: v6.1.2) each time a PR is merged
# Used by: .github/workflows/draft-new-release.yml

name-template: "v$RESOLVED_VERSION"
tag-template: "v$RESOLVED_VERSION"
tag-prefix: "v"
change-template: "- $TITLE (#$NUMBER)"
version-resolver:
major:
Expand All @@ -11,15 +12,14 @@ version-resolver:
minor:
labels:
- "feature"
- "enhancement"
default: patch
template: |
deploying `main` branch to stage:

$CHANGES
[www.dzcode.io](https://www.dzcode.io)

To test on `stage` environment go to:
Join us on [Discord](https://discord.gg/TGbPsSMJC2)

- [stage.dzcode.io](https://stage.dzcode.io)
$CHANGES

autolabeler:
- label: "breaking-change"
Expand Down
25 changes: 9 additions & 16 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
# This file is used by GitHub when clicking on "Generate Release Notes" in the "Releases" tab.
# We try to align its content with .github/release-drafter.yml.
# Used in case of manual release creation.

changelog:
categories:
- title: Features 🎉
labels:
- feature

- title: Breaking Changes 🚨
- title: Breaking Changes
labels:
- breaking-change

- title: Enhancements 💅
- title: Features
labels:
- feature
- enhancement

- title: Bug fixes 🐞
- title: Bug fixes
labels:
- bug
- bug-fix
- bugfix
- fix

- title: Projects 🚀
- title: Projects
labels:
- project

- title: Articles 📰
labels:
- article

- title: Documentation 📜
labels:
- documentation

- title: Other Changes
labels:
- "*"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
# TODO-ZM: update the latest version of the action
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64 changes: 19 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# dzcode.io

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

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

**Apps:**

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

**Packages**
**Packages:**

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

## Get Started

### Perquisites
### Prerequisites

Make sure you have:

- [Git](https://git-scm.com/)
- [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))
- [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))
- [Docker](https://www.docker.com/) installed and running.

### Run it locally

- Open terminal and clone the repo:
- Open a terminal and clone the repo:

```sh
git clone https://github.com/dzcode-io/dzcode.io.git
git clone https://github.com/dzcode-io/dzcode.io.git
```

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

```sh
cd dzcode.io
cd dzcode.io
```

- Install dependencies:
Expand All @@ -47,46 +46,21 @@ Make sure you have:
npm install
```

- Run it locally by either:

```sh
npm run dev:web
```

```sh
npm run dev:api
```
- Run it locally:

```sh
npm run dev:all
```

- For api server go to <http://localhost:7070>
- For web server go to <http://localhost:8080>
- For search server go to <http://localhost:7700>

**Note**

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:
- For the API server, go to <http://localhost:7070>
- For the web server, go to <http://localhost:8080>
- For the search server, go to <http://localhost:7700>

```.env
GITHUB_TOKEN=Paste_You_Token_Here
NODE_ENV=development
```

### Run e2e locally

Make **sure** you are in the project **root**, then:

- run web e2e tests by:

```sh
cd web && npm run e2e:dev
```
Please check the README.md files inside `./api` and `./web` for more info.

## Contributing

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

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

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

### Before You Create a Pull Request

- 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).
- 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.
- 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).
- 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.

### List Your Project

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).

## License

Licensed under the MIT license (twitter: [@dzcode_io](https://twitter.com/dzcode_io)).
Licensed under the MIT license (Twitter: [@dzcode_io](https://twitter.com/dzcode_io)).
32 changes: 20 additions & 12 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@

## Folder structure

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

- example of a service is [./src/github/service.ts](./src/github/service.ts)
- example of a controller is [./contributor/controller.ts](./contributor/controller.ts)

There is still temporary old code inside:

- [./src/app/controllers](./src/app/controllers)
- [./src/app/loaders](./src/app/loaders)
- [./src/app/routes](./src/app/routes)
- [./src/app/services](./src/app/services)
- An example of a service is [./src/github/service.ts](./src/github/service.ts).
- An example of a controller is [./contributor/controller.ts](./contributor/controller.ts).

## Dependency injection

We use typedi for dependency injection, please check their docs.
We use typedi for dependency injection. Please check their documentation.

We use it in both services and controllers.

**Note:** if the readme is still unclear, please create a PR with your suggested changes/additions
## The `.env` file

At a minimum, you need a `.env` file with this content:

```.env
NODE_ENV=development
```

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:

```.env
GITHUB_TOKEN=Paste_Your_Token_Here
NODE_ENV=development
```

**Note:** If the README is still unclear, please create a PR with your suggested changes/additions.
2 changes: 1 addition & 1 deletion data/models/documentation/Getting_Started/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ So, you already master or have enough knowledge about a specific topic in IT? yo

## Have Other general suggestions?

Feel free to reach out to [contact@dzcode.io](mailto:contact@dzcode.io) 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).
Feel free to reach out to [contact@dzcode.io](mailto:contact@dzcode.io) 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).

Have fun!
29 changes: 29 additions & 0 deletions web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Web code

## Folder structure

The app is split into main folders inside `./src`:

- `./components`: reusable React components
- `./pages`
- `./redux`: contains slices (reducers and actions), and async actions

Then there are additional folders:

- `./utils`: miscellaneous code
- `./assets`: non-code files
- `_*` folders: boilerplate code

## State management

We use Redux Toolkit, but only the "Redux" part. Please check their documentation.

## Run e2e locally

Make **sure** you have already run `npm run dev:all` at the root of the repo, then in a separate terminal run:

```sh
npm run e2e:dev
```

**Note:** If the README is still unclear, please create a PR with your suggested changes/additions.
4 changes: 2 additions & 2 deletions web/src/_entry/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ const footerSections: FooterProps["sections"] = [
href: "https://www.github.com/dzcode-io",
},
{
localeKey: "footer-category-link-text-slack",
href: "https://join.slack.com/t/dzcode/shared_invite/zt-ek9kscb7-m8z_~cBjX79l~uchuABPFQ",
localeKey: "footer-category-link-text-discord",
href: "https://discord.gg/TGbPsSMJC2",
},
{
localeKey: "footer-category-link-text-facebook",
Expand Down
Loading
Loading