Skip to content

Commit d227a12

Browse files
committed
add items to public release
1 parent 4d4fa05 commit d227a12

7 files changed

Lines changed: 337 additions & 22 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
# Issue Report
3+
4+
### Description
5+
6+
[Provide a brief description of the issue.]
7+
8+
### Steps to Reproduce
9+
10+
1. [First step]
11+
2. [Second step]
12+
3. [Third step]
13+
14+
### Expected Behavior
15+
16+
[Explain what you expected to happen.]
17+
18+
### Actual Behavior
19+
20+
[Explain what actually happened.]
21+
22+
### Additional Information
23+
24+
[Include any additional information such as screenshots, logs, etc.]

.github/workflows/release.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: CI/CD for MetaRang Frontend
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Checkout repository
14+
- name: Checkout repository
15+
uses: actions/checkout@v2
16+
17+
# Set up Node.js
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: "16.x"
22+
23+
# Install dependencies
24+
- name: Install dependencies
25+
run: npm install
26+
27+
# Set Git user for commits
28+
- name: Configure Git user
29+
run: |
30+
git config --global user.name "Awmin"
31+
git config --global user.email "awmin.dn@gmail.com"
32+
33+
# Run standard-version to bump version, generate changelog, and tag the release
34+
- name: Bump version using standard-version
35+
run: |
36+
npx standard-version
37+
38+
# Push changes including version bump and changelog
39+
- name: Push changes
40+
run: |
41+
git push --follow-tags origin main
42+
43+
# Build the project
44+
- name: Build the project
45+
run: npm run build
46+
47+
48+
release:
49+
needs: build
50+
runs-on: ubuntu-latest
51+
52+
steps:
53+
# Checkout the code again
54+
- name: Checkout code
55+
uses: actions/checkout@v2
56+
57+
# Generate tag name based on updated version from package.json
58+
- name: Generate tag name from package.json
59+
id: generate_tag
60+
run: |
61+
VERSION=$(jq -r ".version" package.json)
62+
echo "TAG_NAME=v$VERSION" >> $GITHUB_ENV
63+
64+
# Create GitHub Release
65+
- name: Create GitHub Release
66+
id: create_release
67+
uses: actions/create-release@v1
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70+
with:
71+
tag_name: ${{ env.TAG_NAME }}
72+
release_name: "Release ${{ env.TAG_NAME }}"
73+
body: ${{ github.event.head_commit.message }} # استفاده از متن کامیت
74+
draft: false
75+
prerelease: false

CONTRIBUTING.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
2+
# Contributing to MetaRang Frontend Project
3+
4+
Thank you for considering contributing to the MetaRang Frontend Project! We welcome contributions of all kinds, from bug reports and suggestions to code contributions and documentation improvements.
5+
6+
## Getting Started
7+
8+
Follow the steps below to clone the repository and start working on it.
9+
10+
### 1. Clone the Repository
11+
12+
To start working on the project, clone the repository to your local machine:
13+
14+
```bash
15+
git clone https://github.com/iranpsc/Metaverse-Rang-Front-NextJS.git
16+
```
17+
18+
### 2. Navigate to the Project Directory
19+
20+
Once the repository is cloned, navigate to the project directory:
21+
22+
```bash
23+
cd Metaverse-Rang-Front-NextJS
24+
```
25+
26+
### 3. Install Dependencies
27+
28+
Before running the project, make sure to install all the required dependencies:
29+
30+
```bash
31+
npm install
32+
```
33+
34+
### 4. Run the Project
35+
36+
Start the development server on port 5175:
37+
38+
```bash
39+
npm run dev
40+
```
41+
42+
You can now access the project at `http://localhost:5175`.
43+
44+
## Coding Standards
45+
46+
Please adhere to the following coding standards to ensure consistency and quality across the codebase:
47+
48+
- **Indentation**: Use 2 spaces for indentation.
49+
- **Comments**: Comment your code where necessary to explain complex logic.
50+
- **Variable Naming**: Use meaningful and descriptive variable names written in camelCase.
51+
- **Commit Messages**: Write clear and concise commit messages that describe the changes made.
52+
- **Testing**: Ensure that all new features and bug fixes are thoroughly tested.
53+
54+
## Pull Request Process
55+
56+
To submit a pull request, follow the steps below:
57+
58+
### 1. Create a New Branch
59+
60+
When working on a new feature or bug fix, create a new branch from the `main` branch:
61+
62+
```bash
63+
git checkout -b feature-or-bugfix-name
64+
```
65+
66+
### 2. Make Your Changes
67+
68+
Make your changes on this branch and test thoroughly.
69+
70+
### 3. Commit Your Changes
71+
72+
Once your changes are ready, commit them with a meaningful message:
73+
74+
```bash
75+
git commit -m "A clear and concise description of the changes"
76+
```
77+
78+
### 4. Push the Branch
79+
80+
Push your branch to your fork of the repository:
81+
82+
```bash
83+
git push origin feature-or-bugfix-name
84+
```
85+
86+
### 5. Open a Pull Request
87+
88+
Navigate to the GitHub repository and open a pull request from your branch to the `main` branch. In your pull request description, provide a detailed explanation of the changes and any relevant information.
89+
90+
## Merge Process
91+
92+
- All pull requests must be reviewed and approved by at least one other contributor before they can be merged.
93+
- Ensure that your code passes all tests and linting checks before requesting a review.
94+
- After approval, a maintainer will merge the pull request into the `main` branch.
95+
96+
Thank you for following the contribution guidelines and helping improve MetaRang Frontend Project!

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Paradise Supply Chain Cooperative Company
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

PULL_REQUEST_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
3+
# Pull Request Review and Merge Guidelines
4+
5+
## Pull Request Review Process
6+
7+
1. All pull requests must be reviewed by **at least two developers** before being merged into the `main` branch.
8+
2. Reviewers should ensure:
9+
- The code follows the project's coding standards.
10+
- The functionality introduced by the pull request is working as expected.
11+
- There are no conflicts with the `main` branch.
12+
3. Any required changes or improvements should be communicated via the pull request comments.
13+
4. Once the pull request has been approved by two reviewers, it can be merged by one of the maintainers.
14+
15+
## Conflict Resolution
16+
17+
If there are conflicts with the `main` branch, the author of the pull request must resolve them before the pull request can be merged.
18+
19+
## Tests and Documentation
20+
21+
- Ensure all tests are passing before submitting a pull request.
22+
- If the pull request introduces new functionality, make sure to update or add any necessary documentation.

README.md

Lines changed: 95 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,113 @@
1-
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
21

3-
## Getting Started
2+
# MetaRang Frontend Project
43

5-
First, run the development server:
4+
## Table of Contents
5+
6+
- [Introduction](#introduction)
7+
- [Installation](#installation)
8+
- [Running the Project](#running-the-project)
9+
- [Contribution](#contribution)
10+
- [Development Rules](#development-rules)
11+
- [FAQ](#faq)
12+
13+
## Introduction
14+
15+
This project is designed as part of the national Iranian metaverse known as **MetaRang**. The goal of this project is to develop a frontend platform that provides users with access to the features of the Iranian national metaverse through an optimized and user-friendly interface. This project is a part of the Behesht Supply Chain and aims to create a unique and innovative user experience for users in virtual and parallel worlds.
16+
17+
## Installation
18+
19+
### 1. Clone the Repository
20+
21+
First, you need to clone the repository to your system. Run the following command in your terminal:
22+
23+
```bash
24+
git clone https://github.com/iranpsc/Metaverse-Rang-Front-NextJS.git
25+
```
26+
27+
### 2. Navigate to the Project Directory
28+
29+
Once you have cloned the repository, navigate to the project directory:
30+
31+
```bash
32+
cd Metaverse-Rang-Front-NextJS
33+
```
34+
35+
### 3. Install Dependencies
36+
37+
To install the required dependencies, use the following commands:
38+
39+
```bash
40+
npm install
41+
```
42+
43+
## Running the Project
44+
45+
### 4. Run the Project
46+
47+
To start the project, use the following command based on your development environment:
48+
49+
- **Development mode:**
650

751
```bash
852
npm run dev
9-
# or
10-
yarn dev
11-
# or
12-
pnpm dev
1353
```
1454

15-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
55+
This will run the development server on port `5175`.
56+
57+
- **Production mode:**
58+
59+
```bash
60+
npm run build
61+
npm run start
62+
```
63+
64+
The production server will also run on port `5175`.
65+
66+
### 5. View the Project in the Browser
67+
68+
Instead of accessing the default address `http://localhost:3000`, you need to navigate to the following URLs to access the pages:
69+
70+
- **English version:**
71+
72+
```
73+
http://localhost:5175/en
74+
```
75+
76+
- **Persian version:**
77+
78+
```
79+
http://localhost:5175/fa
80+
```
81+
82+
## Contribution
1683

17-
You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
84+
We welcome your contributions to improve the project. To contribute to the project, follow these steps:
1885

19-
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
86+
1. **Fork the Project:** Fork the repository and work on your own copy.
87+
2. **Create a New Branch:** For each feature or change, create a separate branch:
2088

21-
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
89+
```bash
90+
git checkout -b feature-name
91+
```
2292

23-
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
93+
3. **Regular Commits:** Save your changes with detailed and meaningful commit messages:
2494

25-
## Learn More
95+
```bash
96+
git commit -m "Complete explanation of the change"
97+
```
2698

27-
To learn more about Next.js, take a look at the following resources:
99+
4. **Submit a Pull Request:** After making changes and ensuring everything works properly, submit a pull request for review.
28100

29-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
30-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
101+
## Development Rules
31102

32-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
103+
For project developers, the following guidelines must be followed:
33104

34-
## Deploy on Vercel
105+
1. **Use Separate Branches:** Each new feature or bug fix must be implemented in a separate branch. The branch name should correspond to the change (e.g., `feature-branch`).
106+
2. **Regular and Clear Commits:** Changes should be saved as regular commits with clear, descriptive messages.
107+
3. **Review and Approval:** Before merging any pull request, it must be reviewed by the development team.
108+
4. **Adherence to Coding Standards:** Use linting tools like ESLint to maintain code quality and follow project standards.
109+
5. **Code Cleanup:** Before submitting a pull request, ensure that no unnecessary or test code remains in the project.
35110

36-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
111+
## FAQ
37112

38-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
113+
If you encounter any problems or have any questions, feel free to contact us through the Issues section on GitHub and submit bug reports or requests.

0 commit comments

Comments
 (0)