This project is a MERN (MongoDB, Express.js, React.js, Node.js) stack application designed to facilitate the request, approval, and management of certificates for various courses. It features user authentication, role-based access control, certificate request submission, approval/rejection by admins, certificate generation, and storage on Google Drive.
- User Authentication: Users can register, log in, and log out securely using bcrypt for password hashing and JWT for token-based authentication.
- Role-Based Access Control: Admins have access to features such as approving/rejecting certificate requests and viewing/download certificates of all users, while regular users can request certificates and view their own approved certificates.
- Certificate Request Workflow: Users can submit requests for certificates on completed courses. Admins can approve or reject these requests.
- Certificate Generation: Certificates are dynamically generated using PDF-lib, with user-specific information such as student name, course name, completion date, and certificate ID.
- Google Drive Integration: Approved certificates are uploaded to Google Drive using the Google Drive API. Public URLs and thumbnail links are provided for easy access.
- Responsive Design: The application is designed to be usable on various devices and screen sizes.
- Frontend: React.js, Fetch (for HTTP requests), Material-Tailwind (for UI components)
- Backend: Node.js, Express.js, MongoDB (for data storage), JWT (for authentication), bcrypt (for password hashing)
- Certificate Generation: pdf-lib
- Google Drive Integration: Google Drive API
- Others: OAuth Playground, Console.cloud.google.com
- See .env.sample file in both frontend and backend file for layout of .env file, how it will look like
-
Clone the repository:
git clone https://github.com/Ravish108Coder/tutedude-assignment.git
-
Install dependencies:
express mongoose cookie-parser pdf-lib googleapis
-
Set up environment variables:
- Create a
.env
file in thebackend
directory and configure environment variables such as MongoDB connection string, JWT secret, Google Drive API credentials, etc.
- Create a
-
Run the application:
# Start backend server cd backend npm start # Start frontend server cd ../frontend npm start
-
Open your browser and navigate to
http://localhost:5173
to view the application.
-
User Registration/Login:
- Users can register for a new account or log in with their existing credentials.
-
Certificate Request:
- Once logged in, users can submit requests for certificates on completed courses by providing necessary details.
-
Admin Approval:
- Admins can view pending certificate requests and approve/reject them accordingly.
-
Certificate Management:
- Approved certificates are stored securely and can be viewed/downloaded by the user or admins.
-
Google Drive Integration:
- Certificates are automatically uploaded to Google Drive upon approval, with public URLs and thumbnail links provided for easy access.
- Ravish Kumar - Project Lead & Developer
This project is licensed under the MIT License.