Product focuses on 100% education as well as upskilling developing countries and rural areas.
Education platform is a product which will strive to enable 100% education and will help in upskilling developing countries and rural areas. Edu server is a backend application written using Nestjs, it provides api endpoints which are used by Edu Client mobile application.
Let's setup the backend server on your local machine.
- Install Node.js
- Install Nest cli globally
npm i @nestjs/cli -g
Fork this repo to your GitHub account
Clone the forked repo to your local machine
git clone https://github.com/<YOUR-GITHUB-USERNAME>/edu-server.git
Navigate to project directory
cd edu-server
npm install
- To use the Firebase Admin SDK in the project, create a new firebase project using firebase console.
- After creating a project, go to project settings.
- In project settings of your newly created project there will be tab called as "Service Accounts".
- Click on it, then it will ask to create a service account, click to create a new service account.
- After creating a service account, click on generate new private key it will automatically download a json file.
- Copy the json file from your downloads folder and paste it into the project src/config folder and rename it to "service.json"
- You will have to set up remote repositories for getting latest changes from original repository
- Specify a new remote upstream repository that will be synced with the fork using follwoing command :
$ git remote add upstream https://github.com/codeforcauseorg/edu-server.git
- Verify the new upstream repository you've specified for your fork using
git remote -v
origin https://github.com/<your-user-name>/edu-server.git (fetch)
origin https://github.com/<your-user-name>/edu-server.git (push)
upstream https://github.com/codeforcauseorg/edu-server.git (fetch)
upstream https://github.com/codeforcauseorg/edu-server.git (push)
Your application setup is successfully completed!
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
# fix linting
$ npm run lint:fix
# lint tests
$ npm run lint
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Install mongodb and nestjs/mongoose. MongoDB would be the Database for the project MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas.
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-windows/ The above Url contains the detailed steps to install it locally
1)Download the installer. 2)Run the Installer and continue with the steps 3)Intsall mongodb compass also
Instead of installing MongoDB , you can also setup a mongourl for yourself and work on the project .
Docker is a set of platform as a service products that use OS-level virtualization to deliver software in packages called containers
1).Install Docker (a devops tool) in your system https://docs.docker.com/engine/install/
2).Setup the env variables and all and check if docker desktop is working correctly or not
3).Add a mongourl to your .env file by setting a mongocluster connection through mongoDB Atlas
4).Run the command docker-compose up
Thsi will build the image and container for the project and you can see it running on your console
Now you can use this to run the server for development purposes as well
API documentation of the server endpoints are available on /api
endpoint, which are build using Swagger-UI.
-
Viewing Swagger docs locally :
- Start the server using command
nest start
ornpx nest start
, To generate a full documented DTOs running nest cli is important see here, once the server start running, go tohttp://localhost:5000/api
.
- Start the server using command
-
Viewing Swagger docs if the server is deployed/hosted :
- Get the deployed URL, go to
http://<INSERT_DEPLOYED_URL>/api
.
- Get the deployed URL, go to
Please read our Code of Conduct and Reporting Guidelines for Bug Report and Feature Request
Connect with us on Discord.
Anuj Garg
Ganga Chaturvedi
Kunal Kushwaha
Abhishek Kumar
This project exists thanks to all the people who contribute.
This software is open source, licensed under the MIT License.