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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
**.DS_Store
.vscode
92 changes: 25 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@

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

## Meta

| env \ Project | Frontend (browser) | Data (static backend) |
| :------------- | :------------------------ | :----------------------------- |
| **Production** | https://dzcode.io | https://data.dzcode.io |
| **Staging** | https://staging.dzcode.io | https://data.staging.dzcode.io |

## Table of Content

- [dzCode.io](#dzcodeio)
- [Meta](#meta)
- [Table of Content](#table-of-content)
- [Get Started](#get-started)
- [Perquisites](#perquisites)
- [Clone the repo](#clone-the-repo)
- [Install dependencies](#install-dependencies)
- [Run it locally](#run-it-locally)
- [Contributing](#contributing)
- [Add Your Own Article](#add-your-own-article)
Expand All @@ -24,93 +30,45 @@ The code for [dzcode.io](https://dzcode.io), a website for Algerian open-source

Make sure you have:

- [git](https://git-scm.com/)
- [nodejs](https://nodejs.org/) 10 or higher
- [yarn](https://yarnpkg.com/)
- [Git](https://git-scm.com/)
- [Nodejs](https://nodejs.org/) version 10 or higher
- [Yarn](https://yarnpkg.com/) version 1 or higher

### Clone the repo
### Run it locally

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

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

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

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

### Install dependencies

- Install frontend dependencies:

```shell
cd frontend
yarn
cd ..
```

- Install frontend Firebase dependencies:

```shell
cd frontend/firebase
yarn
cd ../..
```

- Install data dependencies:

```shell
cd data
yarn
cd ..
```

- Install fullstack dependencies:
- Install dependencies:

```shell
cd fullstack
```sh
yarn
cd ..
```

### Run it locally
- Run it locally

- Build fullstack code:

```shell
cd fullstack
yarn build:watch
```sh
yarn start
```

- Open new terminal and Run frontend server:

```shell
cd frontend
yarn dev
```

- Open new terminal and Run data server:

```shell
cd data
yarn build
yarn dev
```

- Open new terminal and Run api emulators:

```shell

cd api/functions && firebase emulators:start
or with the api server (optional)

```sh
yarn start:api
```

- Now, Go to <http://localhost:8080>

- All emulators View status and logs at <http://localhost:4000>
- For api server, all emulators view status and logs at <http://localhost:4000>

## Contributing

Expand All @@ -129,7 +87,7 @@ To add new article let's say "Awesome New Article", simply do the following:
- Add two files:
- `info.json` , a json file containing info about your article, like **title**, **description** etc..., see [this file](https://github.com/dzcode-io/dzcode.io/blob/master/data/articles/Welcome_to_dzCode/info.json) as an example.
- `content.md` , a markdown file which contain your Article text, in form of [markdown](https://www.markdownguide.org/).
- Lastly, to make you article visible, modify the content of [`data/articles/list.json`](https://github.com/dzcode-io/dzcode.io/blob/master/data/articles/list.json) and add your article's folder name `Awesome_New_Article` inside the `"items": []` array.
- Lastly, to make your article visible, modify the content of [`data/articles/list.json`](https://github.com/dzcode-io/dzcode.io/blob/master/data/articles/list.json) and add your article's folder name `Awesome_New_Article` inside the `"items": []` array.

To test and see your article locally, make sure to [you are all set](#get-started), after you run dzCode locally go to http://localhost:8080/Articles/Awesome_New_Article, you will see your article, and you can continue editing from there, once you are happy with the result, create a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) against master branch, and we will be happy to merge it 😃.

Expand Down
3 changes: 2 additions & 1 deletion api/functions/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "functions",
"name": "dzcode.io-api",
"scripts": {
"build": "tsc",
"build:watch": "tsc --watch",
Expand Down Expand Up @@ -28,5 +28,6 @@
"firebase-functions-test": "^0.2.0",
"typescript": "^3.8.0"
},
"license": "MIT",
"private": true
}
Loading