-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: changes to routes and new statuscodes
- Loading branch information
1 parent
b0ec17b
commit 37fbfa4
Showing
15 changed files
with
242 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,66 @@ | ||
# Milan-Backend | ||
This is the official repository for Milan's server side codes. | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![GitHub release (latest by date)](https://img.shields.io/github/v/release/MilanCommunity/Milan-Backend)](https://github.com/MilanCommunity/Milan-Backend/releases) ![GitHub repo size](https://img.shields.io/github/repo-size/MilanCommunity/Milan-Backend) | ||
|
||
# What is Milan ? | ||
|
||
Milan is a hub to **connect** NGOs, Charities, and the world to **collaborate** and **build** a better tomorrow. Sign up as an organization/user and be a cause for change. Don't forget to drop a star ⭐. | ||
|
||
<br/> | ||
|
||
|
||
|
||
<div align="center" > | ||
|
||
<div align="center" > | ||
<a href="https://api.milanhub.org/"><img alt="C" src="https://img.shields.io/badge/Production%20Release-07C160?style=for-the-badge&logo=vercel&logoColor=white"></a> <a href="https://github.com/sponsors/tamalCodes"><img alt="Sponsor Tamal" src="https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#white"></a> | ||
|
||
|
||
</div> | ||
|
||
<img alt="Milan Readme Banner" src="./docs/pictures/MilanBanner.png" width="700px"/> | ||
|
||
</div> | ||
|
||
<br> | ||
|
||
## Tech Stack(Backend) 💻 | ||
|
||
<p > | ||
<a href="https://nodejs.org/it/docs"><img alt="C" src="https://img.shields.io/badge/node.js-%2343853D.svg?style=for-the-badge&logo=node.js&logoColor=white"></a> | ||
<a href="https://expressjs.com/"><img alt="C" src="https://img.shields.io/badge/express.js-%23404d59.svg?style=for-the-badge"></a> | ||
<a href="https://www.mongodb.com/docs/"><img alt="C" src="https://img.shields.io/badge/MongoDB-%234ea94b.svg?style=for-the-badge&logo=mongodb&logoColor=white"></a> | ||
<a href="https://docs.github.com/en"><img alt="C" src="https://img.shields.io/badge/GitHub-%23121011.svg?style=for-the-badge&logo=github&logoColor=white"></a> | ||
<a href="https://opensource.guide/how-to-contribute/"><img alt="C" src="https://img.shields.io/badge/Open%20Source-%23F05032.svg?style=for-the-badge&logo=open-source-initiative&logoColor=white"></a> | ||
<a href="https://docs.github.com/en/actions"><img alt="C" src="https://img.shields.io/badge/GitHub%20Actions-%232671E5.svg?style=for-the-badge&logo=github-actions&logoColor=white"></a> | ||
<a href="https://docs.github.com/en/actions"><img alt="C" src="https://img.shields.io/badge/Razorpay-02042B?style=for-the-badge&logo=razorpay&logoColor=3395FF"></a> | ||
|
||
</p> | ||
|
||
</br> | ||
|
||
## Contributing to Milan 🔐 | ||
|
||
Remember, Good PR makes you a Good contributor ! | ||
|
||
We at Milan work hard to maintain the structure, and use conventional Pull request titles and commits. Without a proper template for the PR, not following the guidelines and spam might get the pull request closed, or banned. | ||
|
||
### 1️⃣ Setting up the project locally | ||
|
||
- [Forking + Cloning Guide](/docs/CloneSetup.md) | ||
- [Setting up the Backend (current repo)](/docs/BackendSetup.md) | ||
- [Setting up the Frontend](/docs/FrontendSetup.md) | ||
- [Setting up with docker](/docs/DockerSetup.md) | ||
|
||
|
||
### 2️⃣ Contributing guidelines & More | ||
|
||
- [Proper API documentation](https://milan-server.onrender.com/docs/) for developers. | ||
- [Contributing Guidelines](/CONTRIBUTING.md) to be followed. | ||
- [Workflow Overview](/docs/Workflow.md) of our project. | ||
|
||
## License 👮 | ||
|
||
Milan is Licensed under the <a href="./LICENSE">MIT License</a>. Please go through the License at least once before contributing. | ||
|
||
## Support 🙏 | ||
|
||
**Don't forget to drop a star ⭐.** A heartfelt thank you to those who have contributed to this project. We are really grateful for your contribution. You all are amazing. Opensource for the win 🚀 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Backend Setup | ||
|
||
Follow the below setup to setup the backend locally. We are using `npm` as the | ||
package manager. So make sure you have `node` and `npm` installed in your | ||
system. | ||
|
||
**If not installed, please read | ||
[installation guide](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).** | ||
|
||
## Installing dependencies ⏳ | ||
|
||
- Open your terminal and navigate to the `Milan-Backend` directory. | ||
- Type `npm install` to install all the dependencies. | ||
- Once the installation is done, you can start the frontend server by typing | ||
`npm start`. | ||
- This should start the frontend server on `http://localhost:5000/`. | ||
|
||
## Techstack overview 🌀 | ||
|
||
- We are currently using `ExpressJS v4` along with `MongoDB v6` as the backend | ||
framework. | ||
- We are using `Nodemon` for the hot reloading. | ||
- List of all the other dependencies can be found in the `package.json` file. | ||
|
||
## Setting up `.env` | ||
|
||
We use a `.env` file using the `dotenv` package inside the root of the `server` | ||
directory. | ||
|
||
You must create a `.env` file similar to **[.env.example](../.env.example)** file, remember that if you are using your own database the data might vary. | ||
|
||
|
||
### Setting up `razorpay api key` for `.env` | ||
- Head on to [Razorpay API reference](https://razorpay.com/docs/api) and Sign Up to razor pay remember you don't need to KYC. | ||
- Login after Signing Up then you will see this interface, you can use the test mode. | ||
|
||
<img width="945" alt="image" src="https://github.com/tejaskh3/Milan/assets/98630752/2de85099-8167-4db2-9fc7-9d539c5bcf64"> | ||
|
||
- Then move to `Account & Settings` there you will get API keys option where you can generate the keys. | ||
|
||
<img width="960" alt="image" src="https://github.com/tejaskh3/Milan/assets/98630752/b1feb58c-f71a-4820-b298-40f05d27146e"> | ||
|
||
- Generate and copy the key and its secret and paste it to `RAZORPAY_KEY_ID` and `RAZORPAY_KEY_SECRET` respectively and you are done setting up backend. | ||
|
||
<img width="359" alt="image" src="https://github.com/tejaskh3/Milan/assets/98630752/5f08bde3-17fa-472d-9587-9524fa737dd5"> | ||
|
||
## Coding standards 🔐 | ||
|
||
- Make sure to follow proper latest coding practices. | ||
- Maintain a good readable folder structure | ||
- Incase adding an API, do document it. | ||
|
||
## Next steps 🚀 | ||
|
||
So now you have the the frontend up and running locally. Now you can start working on the issues. Now follow the below steps to setup the frontend locally (if needed). | ||
|
||
1. [Setting up the frontend locally](/docs/FrontendSetup.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Getting started | ||
|
||
## Forking 🍴 | ||
|
||
- There will be a `Fork` button on the top right corner of the repo. Click on it. | ||
- This will create a copy of the repo in your GitHub account. | ||
|
||
## Cloning 🌀 | ||
|
||
- After the fork is done, you will be redirected to your forked repo. | ||
- The next step is to clone the repo to your local storage. | ||
- Open your terminal and enter the following command and hit enter. | ||
|
||
```bash | ||
git clone https://github.com/MilanCommunity/Milan-Backend.git | ||
``` | ||
- This will clone the repo to your local storage and you can start working on it. | ||
|
||
## Next steps 🚀 | ||
|
||
So now you have the repo in your local storage. The next step is to setup the frontend and backend locally. You can refer to the following links to setup the frontend and backend locally. | ||
|
||
1. [Setting up the backend (current repo)](/docs/BackendSetup.md) | ||
2. [Setting up frontend locally](/docs/FrontendSetup.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Frontend Setup | ||
|
||
Follow the below steps to setup the Frontend locally. We are using `npm` as the package manager. So make sure you have `node` and `npm` installed in your system. | ||
|
||
**If not installed, please read [installation guide](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm).** | ||
## Installing dependencies ⏳ | ||
|
||
- Open your terminal and navigate to the `Milan` directory. | ||
- Type `npm install` to install all the dependencies. | ||
- Once the installation is done, you can start the frontend server by typing `npm run dev`. | ||
- This should start the frontend server on `http://localhost:3000/`. | ||
|
||
## Techstack overview 🌀 | ||
|
||
- We are currently using `ReactJS v18` along with `vite v3` as the frontend framework. | ||
- We using `CSS (Bootstrap v5)` for the styling. | ||
- We have also implemented `service workers` which might not run in the development environment but will be used in the production environment. Please clear your cache if you are facing any issues. | ||
- To test service workers in development environment, you can run `npm run build` and then `serve dist` to serve the production build locally. | ||
- Then you can navigate to `http://localhost:5000/` to see the production build running locally with service workers which can be found in `Application tab -> Service workers` in the dev tools. | ||
- List of all the other dependencies can be found in the `package.json` file. | ||
|
||
|
||
## Coding standards 🔐 | ||
|
||
- We are using `ESLint` and `Prettier` for linting and formatting. | ||
- Maintain the same coding standards as the rest of the codebase. | ||
- Follow good naming conventions for the files, variables and functions along with proper documentation (if needed). | ||
- We also use `husky` and `lint-staged` to run the linter and formatter before every commit. Read about this in our [Contributing Guidelines](/CONTRIBUTING.md). | ||
- Maintain a good folder structure, incase you use anu new components or pages make sure you put them in the right folder. | ||
- If you are using any new dependencies, make sure you mention them in the PR. | ||
- If you are using any new Image , compress it using [online tools]("https://www.iloveimg.com/compress-image") and then use it in the project. | ||
- **Remember**, writing readable and clean code while following the coding standards is the best thing for any developer. | ||
|
||
## Setting up the `.env` file | ||
|
||
We use a `.env` file using the `dotenv` package inside the root of the directory. You must create a `.env` file similar to the **[.env.example](https://github.com/MilanCommunity/Milan/blob/main/.env.example)** file in the Frontend repo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Contribution Workflow 🏭 | ||
|
||
We at Milan believe in industry standards and super organized and clean workflow. Here's how your contributions will be handled. | ||
|
||
|
||
## How we merge PRs | ||
|
||
1. Follow [PR Guidelines](https://github.com/MilanCommunity/Milan/blob/main/CONTRIBUTING.md#creating-a-pull-request-) to raise a PR. We wait upto a month before considering it inactive/ready for review. Maintainers and contributors both have other works to do too. | ||
|
||
2. Maintainers will review, request changes, and approve the PR accordingly. If changes are requested do click on the `Resolve Conversation` button to let the maintainers know that you have made the changes. Be paitent at all times. | ||
|
||
3. Once the PR is approved, a label of https://github.com/MilanCommunity/Milan-Backend/labels/%F0%9F%A5%97%20status%3A%20ready%20for%20merge will be added and the PR will be merged. | ||
|
||
|
||
## How we publish releases | ||
|
||
- Once the changes are merged to `main` branch, a new `draft release` will be created. | ||
- The release will be published in due time depending upon how important they are. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.