Giter Club home page Giter Club logo

programming-website's Introduction

Programming Education Website (Back-End)

Educational website full back-end "MVC Architecture" with ๐Ÿ‘‡๐Ÿป


You can use this progect to create a website and post educational courses & videos or otherwise in the website

This project has not been definitively deployed and is only included in my page for sample work

Dependencies.

1. install Node-js
2.   ``    Postman
3.   ``    Mongodb
4.   ``    npm

How to Run?

1. open terminal/cmd/gitbash in progect route
2. type "npm i" //if the node_module folder does not exist
3. type "npm run dev" or "nodemon" to run progect

How to send request to APIs ?

Set your jwt token (It will be sent to you when you register)

Set route and dependencies in postman

Data base models & feature ๐Ÿ‘‡๐Ÿป

APIs

POST   http://localhost:4000/v1/auth/register {UserName, Password, confirmPassword, email, PhoneNum}
POST   http://localhost:4000/v1/auth/login {identifeir , password}
GET    http://localhost:4000/v1/auth/getme  Middlewares: Auth  


POST   http://localhost:4000/v1/categories/set  Middlewares: Auth, Admin {title, href}    
GET    http://localhost:4000/v1/categories/getOne/:id 
GET    http://localhost:4000/v1/categories/getOne/:id 
DELETE http://localhost:4000/v1/categories/removeOne/:id    Middlewares: Auth, Admin


POST   http://localhost:4000/v1/courses/add    Middlewares: Auth, Admin, Multer {title, description, price, href, cover , status, teacher, category, off, keywords} 
PUT    http://localhost:4000/v1/courses/update/:id    Middlewares: Auth, Admin, Multer {title, description, price, href, cover , status, teacher, category, off, keywords} 
DELETE http://localhost:4000/v1/courses/remove/:id  Middlewares: Auth, Admin
GET    http://localhost:4000/v1/courses/getAll/:category
GET    http://localhost:4000/v1/courses/get/:href   Middlewares: Auth 
GET    http://localhost:4000/v1/courses/related/:href   Middlewares: Auth 
GET    http://localhost:4000/v1/courses/popular Middlewares: Auth 
GET    http://localhost:4000/v1/courses/presell Middlewares: Auth 
GET    http://localhost:4000/v1/courses/getAllCourse/:category  Middlewares: Auth 
GET    http://localhost:4000/v1/courses/all Middlewares: Auth 


POST   http://localhost:4000/v1/comments/create Middlewares: Auth  {body, course, :score}
DELETE http://localhost:4000/v1/comments/remove/:id Middlewares: Auth, Admin
PUT    http://localhost:4000/v1/comments/accept/:id Middlewares: Auth, Admin
PUT    http://localhost:4000/v1/comments/reject/:id Middlewares: Auth, Admin
POST   http://localhost:4000/v1/comments/answer/:id Middlewares: Auth, Admin {body}
GET    http://localhost:4000/v1/comments/getAll Middlewares: Auth, Admin


POST   http://localhost:4000/v1/contactus/set   Middlewares: Auth  {body}
GET    http://localhost:4000/v1/contactus/all   Middlewares: Auth, Admin
DELETE http://localhost:4000/v1/contactus/remove/:id    Middlewares: Auth, Admin
POST   http://localhost:4000/v1/contactus/all   Middlewares: Auth, Admin {email, answer}


POST   http://localhost:4000/v1/menu/set    Middlewares: Auth, Admin {title, href}
GET    http://localhost:4000/v1/menu/getall Middlewares: Auth 
POST   http://localhost:4000/v1/menu/setsub/:parentID   Middlewares: Auth, Admin {title, href}
DELETE http://localhost:4000/v1/menu/remove/:id Middlewares: Auth, Admin
DELETE http://localhost:4000/v1/menu/removesub/:id  Middlewares: Auth, Admin


POST   http://localhost:4000/v1/newsletter/create   Middlewares: Auth  {email}
GET    http://localhost:4000/v1/newsletter/getAll   Middlewares: Auth, Admin


POST   http://localhost:4000/v1/notification/send   Middlewares: Auth, Admin {message, adminID}
GET    http://localhost:4000/v1/notification/get    Middlewares: Auth, Admin 
GET    http://localhost:4000/v1/notification/getAll Middlewares: Auth, Admin 


POST   http://localhost:4000/v1/off/create  Middlewares: Auth, Admin {code, percent, course, count}
GET    http://localhost:4000/v1/off/getAll  Middlewares: Auth, Admin
PUT    http://localhost:4000/v1/off/settoall    Middlewares: Auth, Admin {off}
PUT    http://localhost:4000/v1/off/use/:code   Middlewares: Auth, Admin {course}
DELETE http://localhost:4000/v1/off/remove/:code    Middlewares: Auth, Admin 


GET    http://localhost:4000/v1/search/:keyword Middlewares: Auth  


POST   http://localhost:4000/v1/department/add  Middlewares: Auth, Admin {title}
GET    http://localhost:4000/v1/department/getall   Middlewares: Auth 
DELETE http://localhost:4000/v1/department/remove/:id   Middlewares: Auth, Admin 
POST   http://localhost:4000/v1/department/addsub/:parent   Middlewares: Auth, Admin {body}
GET    http://localhost:4000/v1/department/getsubs  Middlewares: Auth 
DELETE http://localhost:4000/v1/department/removesub/:id    Middlewares: Auth, Admin


PUT    http://localhost:4000/v1/users/banUser/:id'  Middlewares: Auth, Admin
GET    http://localhost:4000/v1/users/getall'   Middlewares: Auth, Admin
DELETE http://localhost:4000/v1/users/remove/:id'   Middlewares: Auth, Admin
PUT    http://localhost:4000/v1/users/makeadmin/:id'    Middlewares: Auth, Admin
PUT    http://localhost:4000/v1/users/humiliationToUser/:id'    Middlewares: Auth, Admin
PUT    http://localhost:4000/v1/users/changeInfo'   Middlewares: Auth, Admin {UserName, Password,confirmPassword, email, PhoneNum, }


POST   http://localhost:4000/v1/ticket/create'  Middlewares: Auth  { departmentID, departmentSubID, course, body, priority }
GET    http://localhost:4000/v1/ticket/getall'  Middlewares: Auth, Admin
GET    http://localhost:4000/v1/ticket/myTickets'   Middlewares: Auth  
POST   http://localhost:4000/v1/ticket/answer'  Middlewares: Auth, Admin {body, ticketID}
GET    http://localhost:4000/v1/ticket/:id/answer'  Middlewares: Auth, Admin 
DELETE http://localhost:4000/v1/ticket/remove/:id'  Middlewares: Auth, Admin 
DELETE http://localhost:4000/v1/ticket/removeAnswer/:id'    Middlewares: Auth, Admin 

*all APIs set on localhost:4000 if you want to change the port, just download the progect and change PORT in the .env file

Abilities

1. Send Email To User
2. Hash User Password (no one can see the password)
3. Decode The Password
4. Protection Of All Important APIs
5. Encryption of Database Data
6. Easy And Safe Access To Admin Dashboad (Management dashboard)

More Abilities ...

1.  Signin
2.  Login
3.  GetUserProfile
4.  ManagementOfCategories
5.  ManagementOfComments
6.  ContactUs
7.  ManagementOfCourses
8.  ManagementOfDepartments
9.  ManagementOfSubDepartments
10. ManagementOfMenu
11. ManagementOfSunMenu
12. JoinToNewsletter
13. ManagementOfNotifications
14. ManagementOfOffOnCourses
15. Search
16. SendTicketToSupport
17. ManagementOfUsers

TECHNOLOGY USED

nodejs ex db db db db db

MORE PACKAGE USED

bcrypt : bcrypt body-parser : body-parser cors : cors dotenv : dotenv email-validator : email-validator express : express fastest-validator : fastest-validator jsonwebtoken : jsonwebtoken mongoose : mongoose morgan : morgan multer : multer nodemailer : nodemailer

nodemon : nodemon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.