Skip to content

Commit fa2bf88

Browse files
authored
ft: Generate API Documentation (#146)
1 parent 71ba3b6 commit fa2bf88

17 files changed

+808
-30
lines changed

Diff for: .env.example

+3
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ API_KEY=<api-key-provided-from-sendgrid>
88
SENDER_NAME=<Sender name of sendgrid>
99
API_KEYS=<api-key-provided-from-google-sheet-api>
1010
FRONTEND_URL=<Frontend-url-at-which-the-frontend-app-is-running-on>
11+
SUPER_ADMIN_EMAIL=<super-admin-email>
12+
JWT_SECRET=<jwt-secret>
13+
ADMIN_EMAIL=<admin-email>

Diff for: README.md

+98-24
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,114 @@
1-
# atlp-devpulse-bn
1+
2+
# DevPulse Backend
23

34
## Introduction
45

5-
Pulse is a platform designed to handle ratings for the companies in the **Ed-tech** industries with the its first paying customer being **Andela**. It is currently under development using modern web technologies that prioritize speed and security. This repo holds the codebase for the backend part of the platform which uses **Graphql, Apollo and mongoDB**.
6+
DevPulse is an innovative platform designed to handle ratings for companies in the **Ed-tech** industry, with its first paying customer being **Andela**. It is currently under development using modern web technologies that prioritize speed and security. This repository contains the codebase for the backend part of the platform, which utilizes **GraphQL, Apollo, and MongoDB**.
7+
8+
## Table of Contents
9+
10+
- [Hosted Link](#hosted-link)
11+
- [Features](#features)
12+
- [Technologies](#technologies)
13+
- [Getting Started](#getting-started)
14+
- [Prerequisites](#prerequisites)
15+
- [Installation](#installation)
16+
- [Usage](#usage)
17+
- [API Documentation](#api-documentation)
18+
- [Contributing](#contributing)
19+
- [Contact](#contact)
620

721
## Hosted Link
822

9-
https://andela-devpulse-backend.devpulse.co/
23+
The backend is currently hosted at: [https://atlp-devpulse-bn.onrender.com/](https://atlp-devpulse-bn.onrender.com/)
1024

11-
## How to run
25+
## Features
1226

13-
To run this project on your local machine make sure that all the following are checked
27+
- Real-time performance metrics tracking
28+
- Advanced attendance management
29+
- Dynamic application cycle overview
30+
- Secure authentication and authorization
31+
- Scalable GraphQL API
1432

15-
- [ ] Nodejs installed on your computer ([MacOS](https://nodejs.org/en/download/), [Windows](https://nodejs.org/en/download/), [Linux](https://nodejs.org/en/download/))
16-
- [ ] Git installed on your computer
33+
## Technologies
1734

18-
Use the following commands to get started with the project
35+
To successfully navigate and contribute to the codebase, you should have an understanding of the following technologies:
1936

20-
```js
21-
git clone https://github.com/atlp-rwanda/atlp-devpulse-bn.git
22-
cd atlp-devpulse-bn
23-
npm install
24-
npm run dev
37+
- [GraphQL](https://graphql.org/): A query language for APIs
38+
- [TypeScript](https://www.typescriptlang.org/): A typed superset of JavaScript
39+
- [Apollo Server](https://www.apollographql.com/docs/apollo-server/): A GraphQL server
40+
- [MongoDB](https://www.mongodb.com/): A NoSQL database
41+
- [Node.js](https://nodejs.org/): A JavaScript runtime
42+
- [Express](https://expressjs.com/): A web application framework for Node.js
2543

44+
## Getting Started
2645

27-
### Other scripts and their usages
28-
- `npm run build` is used to build the production ready version of the projects.
29-
Used during deployment
46+
### Prerequisites
3047

31-
## Technologies
48+
Before running this project, make sure you have the following installed:
49+
50+
- [Node.js](https://nodejs.org/) (version 14 or later)
51+
- [Git](https://git-scm.com/)
52+
- [MongoDB](https://www.mongodb.com/try/download/community) (local installation or a cloud-hosted instance)
53+
54+
### Installation
55+
56+
1. Clone the repository:
57+
```bash
58+
git clone https://github.com/atlp-rwanda/atlp-devpulse-bn.git
59+
```
60+
61+
2. Navigate to the project directory:
62+
```bash
63+
cd atlp-devpulse-bn
64+
```
65+
66+
3. Install dependencies:
67+
```bash
68+
npm install
69+
```
70+
71+
4. Set up environment variables:
72+
- Copy the `.env.example` file to `.env`
73+
- Fill in the required environment variables
74+
75+
5. Start the development server:
76+
```bash
77+
npm run dev
78+
```
79+
80+
## Usage
81+
82+
### Available Scripts
83+
84+
- `npm run dev`: Starts the development server using nodemon
85+
- `npm start`: Starts the production server
86+
- `npm test`: Runs the test suite using Jest
87+
- `npm run build`: Builds the production-ready version of the project using TypeScript compiler
88+
- `npm run seed`: Runs the database seeding script
89+
90+
## API Documentation
91+
92+
For detailed information about the API endpoints and how to use them, please refer to our [API Documentation](https://atlp-devpulse-bn.onrender.com/graphql).
93+
94+
## Contributing
95+
96+
We welcome contributions to the DevPulse project! Please follow these steps to contribute:
97+
98+
1. Fork the repository
99+
2. Create a new branch (`git checkout -b feature/AmazingFeature`)
100+
3. Make your changes
101+
4. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
102+
5. Push to the branch (`git push origin feature/AmazingFeature`)
103+
6. Open a Pull Request
104+
105+
Please make sure to update tests as appropriate and adhere to the [Contributor Covenant](https://www.contributor-covenant.org/) code of conduct.
106+
107+
108+
## Contact
32109

33-
To successfully navigate the codebase of the project, you will need undertanding
34-
of the following technologies that are being used to develop this application:
110+
DevPulse Team - [[email protected]](mailto:[email protected])
35111

36-
- GraphQl
37-
- Typescript
38-
- Apollo server
39-
- MongoDB
40-
```
112+
Project Links:
113+
- [https://github.com/atlp-rwanda/atlp-devpulse-bn](https://github.com/atlp-rwanda/atlp-devpulse-bn)
114+
- https://atlp-devpulse-bn.onrender.com/

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"@graphql-tools/merge": "^8.3.7",
4040
"@sendgrid/mail": "^8.1.3",
4141
"apollo-server": "^3.10.2",
42+
"apollo-server-express": "^3.13.0",
4243
"axios": "^1.7.7",
4344
"bcrypt": "^5.1.1",
4445
"bcryptjs": "^2.4.3",

Diff for: public/assets/apple-touch-icon.png

6.17 KB
Loading

Diff for: public/assets/devpulse.svg

+5
Loading

Diff for: public/assets/favicon-96x96.png

3.08 KB
Loading

Diff for: public/assets/favicon.ico

14.7 KB
Binary file not shown.

Diff for: public/assets/favicon.svg

+7
Loading

Diff for: public/assets/site.webmanifest

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "MyWebSite",
3+
"short_name": "MySite",
4+
"icons": [
5+
{
6+
"src": "/web-app-manifest-192x192.png",
7+
"sizes": "192x192",
8+
"type": "image/png",
9+
"purpose": "maskable"
10+
},
11+
{
12+
"src": "/web-app-manifest-512x512.png",
13+
"sizes": "512x512",
14+
"type": "image/png",
15+
"purpose": "maskable"
16+
}
17+
],
18+
"theme_color": "#ffffff",
19+
"background_color": "#ffffff",
20+
"display": "standalone"
21+
}

Diff for: public/assets/web-app-manifest-192x192.png

6.83 KB
Loading

Diff for: public/assets/web-app-manifest-512x512.png

24.8 KB
Loading

Diff for: public/css/doc.css

+190
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
:root {
2+
--color-primary: #16a34a;
3+
--color-primary-dark: #15803d;
4+
--color-primary-light: #dcfce7;
5+
--color-background: #f0fdf4;
6+
--color-text: #333333;
7+
--color-text-light: #666666;
8+
--color-code-bg: #f3f4f6;
9+
}
10+
11+
* {
12+
margin: 0;
13+
padding: 0;
14+
box-sizing: border-box;
15+
}
16+
17+
body {
18+
font-family: 'Inter', sans-serif;
19+
line-height: 1.6;
20+
color: var(--color-text);
21+
background: var(--color-background);
22+
}
23+
24+
.container {
25+
max-width: 1250px;
26+
margin: 0 auto;
27+
padding: 0 20px;
28+
}
29+
30+
31+
header {
32+
background-color: var(--color-primary);
33+
color: white;
34+
padding: 1rem 0;
35+
position: sticky;
36+
top: 0;
37+
38+
}
39+
40+
nav {
41+
display: flex;
42+
justify-content: space-between;
43+
align-items: center;
44+
}
45+
46+
.logo {
47+
font-size: 1.5rem;
48+
font-weight: bold;
49+
display: flex ;
50+
align-items: center;
51+
justify-items: center;
52+
53+
}
54+
55+
.logo img {
56+
width: 40px;
57+
height: 40px;
58+
margin: auto 0;
59+
color: white;
60+
margin-right: 0.5rem;
61+
62+
}
63+
64+
.logo p{
65+
margin: auto 0;
66+
}
67+
68+
.nav-links {
69+
display: flex;
70+
gap: 1rem;
71+
}
72+
73+
.nav-links a {
74+
color: white;
75+
text-decoration: none;
76+
font-size: 0.9rem;
77+
}
78+
79+
main {
80+
padding: 2rem 0;
81+
}
82+
83+
.topheader{
84+
display: flex;
85+
justify-content: space-between;
86+
87+
}
88+
89+
h1, h2, h3 {
90+
color: var(--color-primary-dark);
91+
margin-bottom: 1rem;
92+
}
93+
94+
h1 {
95+
font-size: 2.5rem;
96+
border-bottom: 2px solid #b2f8cb;
97+
;
98+
padding-bottom: 0.5rem;
99+
}
100+
101+
h2 {
102+
font-size: 1.8rem;
103+
margin-top: 2rem;
104+
}
105+
106+
h3 {
107+
font-size: 1.3rem;
108+
margin-top: 1.5rem;
109+
}
110+
111+
p {
112+
margin-bottom: 1rem;
113+
}
114+
115+
ul, ol {
116+
margin-bottom: 1rem;
117+
padding-left: 2rem;
118+
}
119+
120+
code {
121+
font-family: 'Courier New', Courier, monospace;
122+
background-color: var(--color-code-bg);
123+
padding: 0.2rem 0.4rem;
124+
border-radius: 0.25rem;
125+
}
126+
127+
pre {
128+
background-color: var(--color-code-bg);
129+
padding: 1rem;
130+
border-radius: 0.5rem;
131+
overflow-x: auto;
132+
margin-bottom: 1rem;
133+
}
134+
135+
pre code {
136+
background-color: transparent;
137+
padding: 0;
138+
}
139+
140+
.cta-button {
141+
display: inline-block;
142+
background-color: var(--color-primary);
143+
color: white;
144+
text-decoration: none;
145+
padding: 0.75rem 1.5rem;
146+
border-radius: 0.25rem;
147+
font-weight: 500;
148+
border: none;
149+
font-size: 1rem;
150+
transition: background-color 0.3s ease;
151+
}
152+
153+
.cta-button:hover {
154+
background-color: var(--color-primary-dark);
155+
}
156+
157+
footer {
158+
background-color: var(--color-primary-light);
159+
color: var(--color-text);
160+
padding: 2rem 0;
161+
margin-top: 4rem;
162+
}
163+
164+
.footer-content {
165+
display: flex;
166+
justify-content: space-between;
167+
align-items: center;
168+
}
169+
170+
.footer-links a {
171+
color: var(--color-primary);
172+
text-decoration: none;
173+
margin-left: 1rem;
174+
}
175+
176+
@media (max-width: 768px) {
177+
.nav-links {
178+
display: none;
179+
}
180+
181+
h1 {
182+
font-size: 2rem;
183+
}
184+
185+
.footer-content {
186+
flex-direction: column;
187+
gap: 1rem;
188+
}
189+
}
190+

0 commit comments

Comments
 (0)