--- title: ELABS New Website Concept tags: elabsWebV2 --- ## ELABS New Website ### What is currently happening Three websites are running separately. 1. Main Website - for all to see 2. Admin Console - for team and webinar management 3. Event Website - where the forms are generated dynamically ### What needs to be done? Single unified website which will show the basic info about the society in different tabs or on the home page. Then there will be facility of login which will be only availaable for members only. We will be using role based approach. Initially we could start with *Member*, *Admin* and *Faculty*. This will be taken when creation of the user. By default it must be *Member*. When requested will be upgraded to any of the above mentioned. ALl the present functionality will be there along with some new which will be subsequently decided. ### Specific details of backend features 1. **Member** - **Schema** | Field Name | Datatype | Validation | | ---------- | ---------|------------| | name | String | Not Required| | roll | String | roll number only valid if it has 7-8 chars| | email | String | same check for roll with `@kiit.ac.in`| |domain | String | prepare an enum to take all the valid domains | | role | String | `MEMBER`, `ADMIN`, `FACULTY`,`INACTIVE`, `ALUMNI`| |photo | URL | cloudinary/imgur image link | | linkedin | URL | verify that it is a linkedin url | | github | URL | verify that it is a github url | |auth | {otp, authExpire}* | check previvous implementation | |isDeleted | Boolean | default `false`| - **Creation of Member** There will be a need of creating an API Post Request where `name`, `roll`, `domain` are mandatory and `github link`, `linkedin link` will be optional. `Role` will be by default to `MEMBER`. > POST /user > - `200` Successful login > - `503` Any validation error > - `503` DB Error/Server Error > Returns the user object with user id - **Update of Member** There will be a need of creating an API PUT request where `name`, `roll`, `email`, `domain`, `github link`, `linkedin link`, `role` *can be updated by a member with role `ADMIN`*. > PUT /user/:id > - `202` - Successful update > - `404` - Member not found > - `503` - validation error > - `503 - DB Error/Server Error` - **Get all team members** There will be API GET Request which will return all the details of the members with the authentication details (this part is already implemented). You should keep in mind that you need to fetch only those members who has `isDeleted` as `false` > GET /user - all users in general > > Valid queries > - id = search by user id > - name = search by name > - roll = search by roll > - email = search by email > - domain = search by domain > --- > Returns always array of member object or empty array > - 200 - Success > - 503 - DB Error/Server Error - **Delete a team member** We will be doing soft delete by making `isNotMember` as `true` which will be initially `false`. > DELETE /user/:id > As it is a soft delete, you need to make the `isDeleted` field for that particular user `true`. > `200` - for successful update > `404` - member not found > `503` - Server Error/ DB error 3. **Courses** 4. **Classes** 5. **Attendance** ### UI Features - Home tab - What is Elabs? - What have been done till now - Projects showcase - Domains offered - Each domain must redirect to the course details running that time - Team tab - Faculty In charge names - Alumni - Current Members (Sorted by domain then year wise) - All data fetch from API - Register Tab - Current registration for classes must open - Put the input fields as required - Submit button - Login - Console login...will redirect to /dashboard ### Things to keep in keep in mind - For backend we will be using Express, Nodejs, MongoDB. - Repos - https://github.com/Kiit-Elabs/elabs-new-api - Backend - https://github.com/Kiit-Elabs/elabs-admin-console - Admin Console - https://github.com/Kiit-Elabs/elabs-events - Events for forms - https://github.com/Kiit-Elabs/Elabs_web_frontend - Society Website - Backend URLs avaiable for dev - STAGING - https://api-elabskiit.herokuapp.com - Backend ENVs - LOCAL - https://hackmd.io/@webdevback/env#LOCAL---BACKEND - Frontend - STAGING - https://staging.elabs-admin-console.pages.dev