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
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

10 changes: 0 additions & 10 deletions .prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions .prettierrc.json

This file was deleted.

192 changes: 90 additions & 102 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,167 +1,155 @@
<h1 align="center"> ✨Nomads.solutions ✨ </h1>

[![Node.js CI](https://github.com/techy1999/BlogFrontend/actions/workflows/node.js.yml/badge.svg)](https://github.com/techy1999/BlogFrontend/actions/workflows/node.js.yml)
[![Node.js CI](https://github.com/techy1999/BlogFrontend/actions/workflows/node.js.yml/badge.svg)](https://github.com/techy1999/BlogFrontend/actions/workflows/node.js.yml)

### About

`nomads.solution` is upcoming project for learner to learn new skill. Technical contribution to project. Writing blog and many other thing are under pipeline.
```nomads.solution``` is upcoming project for learner to learn new skill. Technical contribution to project. Writing blog and many other thing are under pipeline.

## Features

> Guest User

- Home page
- Blog
- Home page
- Blog
- Login
- Register

> Logged User

- Home Page
- Blog
- My blog
- create blog
- logout
- profile


## Tech

- [Reactjs] -
- [Redux] -
- [Reactjs] -
- [Redux] -
- [MUI-Material] -
- [MUI-Icons] -
- [MUI-Icons] -
- [NodeJs] -
- [HTML/CSS] -

## Setup Locally
- [HTML/CSS] -

- Clone the repository `git clone <url>`
- Go inside the `BlogFrontend` Folder
- install package `npm i `
- create a file `.env.local`
- Paste below code in `.env.local `

```
REACT_APP_DEV_URL="http://localhost:8000/api"
REACT_APP_PROD_URL="https://www.nomads.solutions/api"
REACT_APP_ENVIRONMENT="production" #Change it to "development" for local development testing.
```
## Setup Locally
- Clone the repository ``` git clone <url> ```
- Go inside the ```BlogFrontend``` Folder
- install package ```npm i ```
- create a file ``` .env.local ```
- Paste below code in ```.env.local ```

- To start the project run command `npm start`
- Try to access the website in browser `http://localhost:3000/`
```
REACT_APP_DEV_URL="http://localhost:8000/api"
REACT_APP_PROD_URL="https://www.nomads.solutions/api"
REACT_APP_ENVIRONMENT="production" #Change it to "development" for local development testing.
```
- To start the project run command ```npm start```
- Try to access the website in browser ```http://localhost:3000/```

# How to contribute and guidelines

- Clone the repository `git clone <url>`
- Follow above steps `## Setup Locally` to setup locally
- Clone the repository ``` git clone <url> ```
- Follow above steps ``` ## Setup Locally ``` to setup locally
- Go to issue tab and start picking the new issue or discussion form to get the update
- Pick an issue by putting the comment in the issue
- Once picked create a new branch following
- Once picked create a new branch following

- ### Steps to follow
- ### Steps to follow
1. Create a branch from main
2. Naming format

1. Create a branch from main
2. Naming format
```
For feature - feature/yourgithubuser/[yr-<year>]/issuenumber
For bug - bug/yourgithubuser/[yr-<year>]/issuenumber

```
For feature - feature/yourgithubuser/[yr-<year>]/issuenumber
For bug - bug/yourgithubuser/[yr-<year>]/issuenumber
```

```
3. checkout to that branch
```

3. checkout to that branch
git checkout -b branch_name

```
```

git checkout -b branch_name
4. start working on branch

```
5. once done
```
git add . # add all the stage
git commit -m "<meaning commit message>" #commit your changes with proper message
git push origin branch_name #push your code

4. start working on branch
```
6. now go to the UI ie. github.com and create a new pr
7. you can follow some tutorial as well [here](https://www.youtube.com/watch?v=8lGpZkjnkt4)

5. once done

```
git add . # add all the stage
git commit -m "<meaning commit message>" #commit your changes with proper message
git push origin branch_name #push your code

```

6. now go to the UI ie. github.com and create a new pr
7. you can follow some tutorial as well [here](https://www.youtube.com/watch?v=8lGpZkjnkt4)

> note :- Always take pull from main , keep your code updated always !
> note :- Always take pull from main , keep your code updated always !

## Learning

Learning resource for new contributors
Learning resource for new contributors

| Plugin | README |
| ------ | ------ |
| Reactjs | [https://react.dev/learn] |
| Material UI | [https://mui.com/material-ui/all-components/] |
| Image | [https://undraw.co/illustrations] |
| Github | [https://www.youtube.com/watch?v=RGOj5yH7evk&t=425s]

| Plugin | README |
| ----------- | ---------------------------------------------------- |
| Reactjs | [https://react.dev/learn] |
| Material UI | [https://mui.com/material-ui/all-components/] |
| Image | [https://undraw.co/illustrations] |
| Github | [https://www.youtube.com/watch?v=RGOj5yH7evk&t=425s] |

===================================

> # Note :- For learning purpose only.(For admin)

> Phase 1.

### How to Setup for deployment on S3
> Phase 1.

We are using s3 for deployment of our website
### How to Setup for deployment on S3

We are using s3 for deployment of our website
- Create public bucket with public access , access policy is below
- enable static hosting.
- enable acl.

```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "*",
"Resource": "arn:aws:s3:::nomadsfrontendproduction/*"
}
]
}

```

```
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "*",
"Resource": "arn:aws:s3:::nomadsfrontendproduction/*"
}
]
}

```
- create build and drag and drop
- Automatically deployed.

### In our case we have a CI/CD pipeline which runs whenever new code is merged in the main branch

> How setup is done.

> How setup is done.
1. create action runner in github
2. create env file and name is similar in code below

- create env in github go to setting > secrets and variables> Action > New repository secret
2. create env file and name is similar in code below
- create env in github go to setting > secrets and variables> Action > New repository secret

```
REACT_APP_DEV_URL="http://localhost:8000/api"
REACT_APP_PROD_URL="https://www.nomads.solutions/api"
REACT_APP_ENVIRONMENT="production" #Change it to "development" .

```
```
REACT_APP_DEV_URL="http://localhost:8000/api"
REACT_APP_PROD_URL="https://www.nomads.solutions/api"
REACT_APP_ENVIRONMENT="production" #Change it to "development" .

```
- create for aws named
```
S3_BUCKET=xxxxxxx # get it from aws s3 bucket name
AWS_SECRET_ACCESS_KEY=xxxxx # Get from IAM user create security credentials
AWS_SECRET_ACCESS_ID=xxxxx # Get from IAM user create security credentials

```
S3_BUCKET=xxxxxxx # get it from aws s3 bucket name
AWS_SECRET_ACCESS_KEY=xxxxx # Get from IAM user create security credentials
AWS_SECRET_ACCESS_ID=xxxxx # Get from IAM user create security credentials

```
```

3. Put below code
3. Put below code

```

Expand All @@ -178,7 +166,7 @@ jobs:
strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v1
- run: npm ci
Expand All @@ -190,7 +178,7 @@ jobs:
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
env:
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -202,8 +190,8 @@ jobs:

> Phase 2.

Deployment using creating build deployed on aws using `nginx` and url to `www.nomads.solutions`
Deployment using creating build deployed on aws using ```nginx``` and url to ```www.nomads.solutions```

## License

## License
MIT
Loading