Create schema-models based on the following structure (User and Project). → Perform client-side validation using Bootstrap in the form. Perform full CRUD operations for Projects using the following routes: ● GET /projects ● GET /project/new ● POST /project ● GET /projects/:id ● GET /projects/:id/edit ● PUT /projects/:id ● DELETE /projects/:id Note: Only the projectName field cannot be edited once created. Form fields must follow the schema: ● User: username, password, fullName, profession, joinedOn (auto) ● Project: projectName, description, deadline, status, teamMembers (as comma-separated) Use Bootstrap to enforce required fields and basic validation (e.g. valid date for deadline). Implement Passport authentication and route protection using the following routes: ● /register ● /login ● /logout Display the logged-in user’s full name at the top-right corner. Use sessions and Passport to handle authentication and login persistence. Follow proper MVC structure: ● public/ – static files (Bootstrap CSS/JS) ● views/ – ejs templates (register.ejs, login.ejs, project-form.ejs, etc.) ● models/ – separate files for user.js and project.js ● routes/ – separate files for project and user
I'll create a complete MVC application with Passport authentication and CRUD operations for Projects. Let's start by setting up the project structure and implementing each component.
I've created a complete MVC application with Passport authentication and CRUD operations for Projects. Here's a breakdown of the key components:
Implemented all required routes:
npm install
npm run dev
Please make sure to add the following environment variable to your project: