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.
- Open your terminal and navigate to the
KarmaCircle/apps/apidirectory (this repo is a monorepo — the backend lives atapps/api, not the repo root). - Type
npm installto install all the dependencies. - Once the installation is done, you can start the backend server in watch mode
by typing
npm run dev. - This should start the backend server on
http://localhost:5000/. - Interactive API docs are served at
http://localhost:5000/docsonce the server is running.
- We are currently using
ExpressJS v4,TypeScript, andMongoDBas the backend stack. npm run devruns the server in watch mode viatsx.npm run buildcompiles TypeScript todist/, andnpm startruns the compiled build (used in production, on non-Vercel hosts).npm run typecheck,npm run lint, andnpm testcheck types, lint, and run the Jest/Supertest test suite, respectively.- List of all the other dependencies can be found in the
package.jsonfile.
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 file, remember that if you are using your own database the data might vary.
To set up the Google Client ID and Client Secret for your application, follow these steps:
-
Project Creation:
- Go to the Google Developers Console.
- Create a new project by clicking on the project dropdown.
-
Enable API Services:
- Click on "Enabled API services" and select your project.
- Create Credentials:
- Navigate to the "Credentials" section.
- Click on "Create credentials" and choose "OAuth client ID."
-
Configure OAuth Client:
- Fill out the form:
- Choose "Web application" as the application type.
- Provide your support email.
- You don't need to provide a logo for the OAuth consent screen.
- Fill out the form:
-
Obtain Client ID and Client Secret:
- After completing the configuration, you'll receive your Client ID and Client Secret.
-
Final Steps:
- Update your application's
.envfile with the obtained Client ID and Client Secret.
CLIENT_ID="your-client-id" CLIENT_SECRET="your-client-secret"
- Update your application's
- Head on to Razorpay API reference 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.
- Then move to
Account & Settingsthere you will get API keys option where you can generate the keys.
- Generate and copy the key and its secret and paste it to
RAZORPAY_KEY_IDandRAZORPAY_KEY_SECRETrespectively and you are done setting up backend.
- Make sure to follow proper latest coding practices.
- Maintain a good readable folder structure
- Incase adding an API, do document it.
So now you have the the frontend up and running locally. Now you can start working on the issues. You can follow the below steps to get started with the frontend.



