A web learning platform made for individuals and corporate based trainees using the MERN
stack.
Course Indoors was made with the intent to make learning easier for everyone and anyone at any time or place
We standardized our coding style by enforcing certain rules using ESLint
and Prettier
Our code style is simple and it consists of 3 main pillars :
- camelCasing for variables and functions
- PascalCasing for classes and
ReactJS
components - Single quotes for strings and all lines ending in semi colons
- ReactJS
- MaterialUI
- React-Bootstrap
- Sass
- Stripe-Checkout
- Node.js
- Express
- Mongoose
- Stripe-js
- NodeMailer
- jspdf
- MongoDB
- MongoDB Atlas
- Git
- Postman
- VS Code
- Authorization
- Authentication
- Credit card payment
- Write notes and download it on the fly
- Dedicated mailing service
import BaseAxios from '../Requester/BaseAxios';
export const signUp = (userInfo) => {
return BaseAxios.post('/guest/signup', userInfo);
};
export const signIn = (userInfo) => {
return BaseAxios.post('/guest/signin', userInfo);
};
export const logOut = () => {
sessionStorage.setItem('id', '');
sessionStorage.setItem('type', '');
localStorage.setItem('id', '');
localStorage.setItem('type', '');
return BaseAxios.post('/guest/logout');
};
@use './../../../scss/_variables' as *;
.hover {
&:hover {
cursor: pointer;
}
}
.card {
width: 12rem;
margin: auto;
background-color: $accent-light;
border-radius: $border-radius;
transition: 400ms;
&:hover {
transform: scale(1.06);
}
}
.card-img-top {
padding: 4%;
border-radius: $border-radius + 8;
}
.font-primary {
color: $primary;
font-size: 1.5em;
}
.font-secondary {
color: $secondary;
}
#currency {
color: rgb(7, 189, 7);
font-weight: 500;
}
#card-button {
background-color: $accent;
border: 0;
border-radius: $border-radius;
transform: scale(0.9);
&:hover {
background-color: $accent;
}
}
const getInstructorById = async (req, res) => {
const { id } = req.query;
const instructor = await Instructor.findById(id);
if (instructor) {
res.status(200).json(instructor);
} else {
res.status(404).json({ error: 'instructor not found' });
}
};
- Head into the frontend directory through your favorite terminal and type
npm i
- Head into the backend directory through your favorite terminal and type
npm i
- Create a .env file and place it inside the backend directory and place inside of it the following variables
MONGO_URI
PORT
JWT_SECRET
REFRESH_TOKEN_SECRET
STRIPE_SECRET
/guest
POST/signup
POST/signin
POST/logout
/admin
POST/grantrefund
POST/promotion
POST/grantaccesstocourse
/instructor
PATCH/:id
POST/reports
POST/instructorreviews
/individual
PATCH/:id
POST/:id
GET/courses
/corporate
PATCH/:id
POST/:id
GET/courses
Everyone is welcome to contribute, either ask to be assigned on one of the issues or create an issue yourself and it should be approved as soon as possible
Distributed under MIT license.