Welcome to the backend of the ScholarX project!
ScholarX is an initiative that aims to provide free premium mentoring assistance to elite undergraduate students based in Sri Lanka. The program connects these students with Sri Lankan expatriates currently involved with some of the world's most renowned universities or Fortune 500 companies. The goal is to establish a sustainable education structure within Sri Lanka by leveraging knowledge and expertise from around the globe.
We welcome contributions to make ScholarX even better! Feel free to send us a pull request with your changes or improvements. Check out our Development Best Practices at SEF for guidelines.
Before you can start using this project, make sure you have the following installed on your machine:
- Node.js (version 14 or later)
- npm (version 6 or later)
Follow these steps to get started with the ScholarX backend:
-
Clone this repository to your local machine:
git clone https://github.com/yourusername/scholarx-backend.git
-
Install the dependencies:
npm install
-
Copy the
.envfile:cp .env.example .env
-
Replace the environment variables in the newly created
.envfile with your configuration. -
Start the server:
npm start
-
Run Tests:
npm test -
Open your web browser and navigate to
http://localhost:${server_port}to access the running server.
We strive to maintain a high code quality. You can check for linting issues by running:
npm run lintAnd to automatically format the code, use:
npm run formatHere's an overview of the project structure:
scholarx-backend/
├── src/
│ ├── controllers/
│ │ └── index.ts
│ ├── middleware/
│ │ └── index.ts
│ ├── routes/
│ │ └── index.ts
│ ├── services/
│ │ └── auth.service.ts
│ ├── entities/
│ │ └── profile.entity.ts
│ ├── index.ts
│ └── types.ts
├── .env.example
├── .gitignore
├── package.json
├── tsconfig.json
└── README.md
src/controllers/: Contains the controller classes that handle incoming requests.src/middleware/: Contains the middleware functions used to modify requests and responses.src/routes/: Contains the route definitions for the application.src/services/: Contains the service definitions for the application.src/entities/: Contains the entity models for the application.src/index.ts: Creates and configures the Express application and starts the server.src/types.ts: Defines custom types for the application..env.example: An example configuration file for environment variables..gitignore: A list of files and directories to be ignored by Git.package.json: Contains information about the project and its dependencies.tsconfig.json: Configuration file for the TypeScript compiler.
We appreciate your interest in ScholarX. Happy contributing! If you have any questions or need assistance, please don't hesitate to reach out to us.
