You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hackerz is a website devloped using MERN stack which can be utilized by:
Individual Trainees
Corporate Trainees
Instructors
Admins
to do the following features :-
Features:
Trainees:
Search and sort available courses suited to your preferences
Check out the course outlines before enrolling in it
Enroll in your most favourite courses
Solve exercises made by verified instructors for your most favourite courses
Take notes and download them as you watch videos uploaded by verified instructors
-Review and rate the courses you've enrolled in!
And if you don't like any of that! You can just request to refund the course.
Instructors:
Add your own courses that you wish to teach
Add multiple subtitles according to your liking
Link videos in your courses for the trainees to watch
Create exercises for the trainees to solve in order to test their understanding
Admins:
Create corporate users on demand
Create instructors on demand
Accept or deny corporate user requests to enroll in courses
Motivation
As students, we find some of the material presented to us to be somewhat restrictive, and while the internet is vast and rich in learning material, we found it a bit hard to locate step-by-step tutorials and classes that would hold our hands while learning new things. Enter Hackerz. We decided to take this into our own hands and introduce a service that has courses tailored for new learners, made by users, for users.
Build Status
Incomplete. Wallet function for trainees still not yet implemented alongside with admins accepting refund requests. Some backend failures might appear due to no full-error prevention.
Code Style
We opted for prettier as a formatter and es-lint as a linter. These tools help us to keep our codebase organized, readable, and up-to-date. They help us to adhere to the coding standards, and ensure that our code is free of any potential errors.
Code Examples
The following code is an example of a simple webpage in our coding style to show the basic course information alongside its subtitles:-
importReact,{useRef,useEffect,useState}from"react";importCardfrom"react-bootstrap/Card";constaxios=require("axios").default;constAPIURL="http://localhost:5000";exportdefaultfunctionCourseView({ user }){const[course,setCourse]=useState([]);constfetchCourse=async()=>{constresponse=awaitaxios.get(APIURL+"/courses/"+id);setCourse(response.data);};useEffect(()=>{fetchCourse();},[]);return(<CardclassName="mt-4 mb-5 w-50 mx-auto"><Card.Header>{course.title} by {course.instructorUsername}</Card.Header>{course.subtitles.map((subtitle)=>{return<Card.Text>{subtitle.title}</Card.Text>;})}</Card>);}
How to use
As a user you can view the website features with either having an account or not.
First of all our home page has a Navigation bar which contains a search button which will allow the guest user to search for the course they want. They can search by the course name, course subject - sort by most popular or even filter by price and rating.
A list of the available courses will be displayed in the form of cards which a user can click on in order to view more details about the course (such as: preview video, subtitles, duration and reviews of the course)
As a guest user this is the last step you can reach, however as a logged in user you can enroll in your preffered courses - which gives you access to various exercises that you can practise with as well as subtitles content alongside their respective videos. After watching videos, you are able to mark the subtitles as completed. Finally, after completion of the course, a certificate is sent to their email and can be downloaded upon request.
Contribute
We find some of those features useful for the future of our project:
Discussion board, where you can see people's status and the current course they are enrolled in to ask for their opinion on it
Admin checking validity of info presented in a course or legality of it (ex. no flat earth conspiracy theorists or how to make meth)
Tech
Hackerz uses a number of open source projects to work properly:
Install the dependencies and devDependencies and start the server.
cd hackerz
npm i
node backend/server
Install the dependencies and deploy the frontend in another tab
npm i
npm start
Verify the deployment by navigating to your server address in
your preferred browser.
127.0.0.1:3000
Screenshots
Admin Panel
Search with filters
Course View as Guest
Course View as enrolled Trainee
Solve Exercises and view your score
Tests
After each database change. It is preferred to check if the data got updated. For example: After changing a user's email, you can check if the email got updated by fetching this user's information using the API reference.
GET 127.0.0.1:5000/admin/get-user/${username}
All tests can be done via Postman using the API url 127.0.0.1:5000. Use the following API reference for your tests:
API Reference
Get user information
GET /admin/get-user/${username}
Parameter
Type
Description
username
string
Required. User's username
Create a new admin user
POST /admin/addadmin
Create a new instructor user
POST /admin/addinst
Body
Type
Description
username
string
Required. User's username
password
string
Required. User's password
Create a new corporate trainee user
POST /admin/addcorp
Body
Type
Description
username
string
Required. User's username
password
string
Required. User's password
Create a new individual trainee user
POST /admin/addindiv
Body
Type
Description
username
string
Required. User's username
password
string
Required. User's password
Get corporate course requests
GET /admin/corp-requests
Accept a pending corporate course request
POST /admin/${id}/accept
Params
Type
Description
id
string
Required. Corporate Request's ID
Reject a pending corporate course request
POST /admin/${id}/reject
Params
Type
Description
id
string
Required. Corporate Request's ID
Get enrolled in a course as an individual trainee
POST /trainee/${user}/${course}/enroll
Params
Type
Description
user
string
Required. User's username
course
string
Required. Course's ID
Check if an individual trainee is enrolled in a course
GET /trainee/${user}/${course}/isEnrolled
Params
Type
Description
user
string
Required. User's username
course
string
Required. Course's ID
Returns all enrolled courses for a trainee
GET /trainee/${user}/myCourses
Params
Type
Description
user
string
Required. User's username
Save trainee's score in an exercise
POST /trainee/${user}/${exercise}/save-score
Params
Type
Description
user
string
Required. User's username
exercise
string
Required. Exercise ID
Body
Type
Description
score
string
Required. Trainee's score in exercise
Trainee marks subtitle as completed
POST /trainee/${user}/${subtitle}/complete
Params
Type
Description
user
string
Required. User's username
subtitle
string
Required. Subtitle ID
Checks if trainee completed a subtitle
GET /trainee/${user}/${subtitle}/isCompleted
Params
Type
Description
user
string
Required. User's username
subtitle
string
Required. Subtitle ID
Returns trainee's progress in a course in percentage