Skip to content
Open

Dev #100

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 125 additions & 0 deletions PROJECT_DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# AST Admin — Arkha Sodhara Tech Administrative Dashboard

A full-stack administrative dashboard built for the **ARKHA SODHARA TECH (AST) Team** at **SRKR Engineering College, CSE Department**. This platform serves as a centralized management hub for running a college tech team's daily operations — from attendance tracking and bootcamp management to hackathon lifecycle orchestration.

---

## 🎯 Purpose

To streamline the administrative workflow of a student tech team by replacing manual processes with a unified digital platform. The system handles everything from daily attendance (with OTP and face recognition) to full hackathon management with real-time countdowns and round-based evaluation.

---

## ✨ Key Features

### 📋 Attendance Management
- Dual-track attendance for **Technology** and **Sadhana (Yoga)** sessions
- OTP-based verification via email (Resend API)
- Optional **face-recognition attendance** using `face-api.js` + webcam capture
- Streak tracking with visual charts (Chart.js)
- Year-wise filtering and student CRUD

### 🏕️ Bootcamp Management
- Structured training program with task assignment by day
- Multi-dimensional scoring (given marks, internal marks, activity marks)
- Material uploads — PDFs and images stored in MongoDB GridFS
- Student data upload via XLSX parsing
- Attendance marking and feedback collection

### 🏆 Hackathon Management
- Full lifecycle management: problem statements → team registration → scoring
- Round-based evaluation with configurable tasks
- Real-time countdown timer via **Socket.IO**
- Photo gallery uploads
- Internal and activity marks tracking

### 🔐 AST Console (Admin Panel)
- Role-based access control: `superAdmin`, `admin`, `edit`, `org`
- Dynamic route management (add/edit/delete/toggle visibility)
- Admin account management with granular permissions
- Middleware-protected API routes

### 🚀 Project Showcase
- Students upload and display their projects
- Like/unlike and share via WhatsApp, Telegram, and Email
- Student login to manage own project listings

### 🤖 AI-Powered Chat
- PDF content analysis using **OctoAI (Llama 2)** model
- "Chat With Me" feature for document Q&A

### 🧑‍💼 Scrum Master Tools
- Daily attendance recording
- Daily work submission tracking

---

## 🛠️ Tech Stack

| Layer | Technologies |
|---|---|
| **Frontend** | React 18, Redux + redux-persist (cookie storage), Chakra UI, Material UI, React Bootstrap, Tailwind CSS, Framer Motion, Formik, Chart.js, react-webcam |
| **Backend** | Node.js, Express (ES Modules), MongoDB (native driver + GridFS), Mongoose |
| **Real-time** | Socket.IO (hackathon countdown timer) |
| **AI/ML** | face-api.js (face recognition), OctoAI SDK (Llama 2 for PDF chat) |
| **Auth & Security** | AES encryption (crypto-js), express-session, role-based middleware |
| **File Storage** | MongoDB GridFS (uploads bucket in VedicVision database) |
| **File Upload** | Multer, XLSX parsing |
| **Notifications** | Resend (email OTP), Twilio (SMS), SMTP.js |
| **Deployment** | Vercel (serverless-ready with vercel.json) |

---

## 🏗️ Architecture

**Monorepo structure:**
```
ASTadmin/
├── client/ # React SPA (Create React App, Webpack)
│ └── src/
│ ├── collection/ # Feature modules (attendance, face, project, etc.)
│ ├── ast-console/ # Admin panel module
│ ├── bootcamp/ # Bootcamp module
│ ├── hackathon/ # Hackathon module
│ └── actions/ # API helpers, auth, Redux store
├── server/ # Express API (ES Modules)
│ └── src/
│ ├── attendance/ # Attendance routes + OTP logic
│ ├── bootcamp/ # Bootcamp CRUD + scoring
│ ├── hackathon/ # Hackathon lifecycle
│ ├── ast-console/ # Console admin + middleware
│ └── multer/ # Upload config
```

**Key architectural decisions:**
- **Two MongoDB databases**: `Mern_Attendance` (primary data) and `VedicVision` (GridFS file storage)
- **Cookie-persisted Redux state** with 12-hour expiration via `redux-persist-cookie-storage`
- **URL query parameter navigation** (`?page=attendance`) for sub-page routing within modules
- **Conditional route rendering** — routes appear only after authentication checks complete
- **Mixed UI library usage** — evolved organically, leveraging Chakra UI modals/toasts, MUI Data Grid, Bootstrap navbar, and Tailwind utilities side by side

---

## 🔐 Authentication & Security

- Admin credentials AES-encrypted in sessionStorage
- Role-based access enforced via Express middleware (`ConsoleMiddleware`, `BootcamEditMiddlware`)
- Origin-check middleware restricts API access to approved domains
- Student login via register number + OTP

---

## 📦 External Integrations

- **OctoAI** — LLM-powered PDF chat
- **Resend** — Transactional email for OTP delivery
- **Twilio** — SMS notifications
- **Socket.IO** — Real-time hackathon timer (external server)
- **face-api.js** — Browser-based face detection and recognition

---

> **Role:** Full-stack Developer
> **Timeline:** [Add your timeline here]
> **Live Demo:** [Add URL if deployed]
> **Repository:** Private/Internal
14 changes: 14 additions & 0 deletions PROJECT_SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## AST Admin — Arkha Sodhara Tech Administrative Dashboard

**What it is:** A full-stack administrative dashboard for a college student tech team (**ARKHA SODHARA TECH** at SRKR Engineering College, CSE Dept). It's a monorepo with a React frontend (`/client`) and Node.js/Express backend (`/server`).

**Core features:**
- **Attendance management** with OTP verification (tech + yoga sessions), streak tracking, and face-recognition-based attendance via `face-api.js`
- **Bootcamp management** — task assignment, scoring/grading, file uploads (PDFs/images), student data, attendance, feedback
- **Hackathon management** — problem statements, team registration, round-based evaluation, scoring, photo galleries, real-time countdown timer (Socket.IO)
- **AST Console** — internal admin panel with role-based access (superAdmin, admin, edit) for managing routes, admins, and system config
- **Project showcase** — students upload projects with like/share (WhatsApp, Telegram, Email)
- **Scrum master tools** — daily attendance and work submission tracking
- **AI chatbot** — OctoAI-powered PDF chat (Llama 2)

**Tech stack:** React 18, Redux + redux-persist (cookie storage), Chakra UI + MUI + Bootstrap + Tailwind (mixed), MongoDB with native driver + GridFS, Express, Socket.IO, face-api.js, Formik, Framer Motion, Chart.js, Multer, Nodemailer/Resend, Twilio.
16 changes: 13 additions & 3 deletions client/.env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
REACT_APP_database=""
REACT_APP_host=""
React_App_BootLogin=""
# Backend API base URL
REACT_APP_database="http://localhost:8000"

# Host URL (frontend)
REACT_APP_host="http://localhost:3000"

# Bootcamp admin login endpoint
React_App_BootLogin="http://localhost:5000/bootcampadminlogin"

# External integrations
React_App_goole=""
React_App_face_api=""
React_App_Students=""
3 changes: 0 additions & 3 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ function App() {
const password = useSelector((state) => state.user.bootpassword);
const salt = CryptoENC

// Admin login check
const AdminLogin = async () => {
await axios.post(process.env.REACT_APP_database + "/admincheck/" + sessionStorage.gmail)
.then((res) => {
Expand All @@ -50,7 +49,6 @@ function App() {
}).catch((e) => {})
}

// Bootcamp login check
const BootCamp = async () => {
await Actions.BootAdminLogin(mail, CryptoAES.decrypt(password ? password : "1234", mail ? mail : "1234").toString(salt))
.then((res) => {
Expand All @@ -62,7 +60,6 @@ function App() {
}).catch((e) => {})
}

// Call all checks on component mount
useEffect(() => {
AdminLogin()
BootCamp()
Expand Down
29 changes: 12 additions & 17 deletions client/src/ast-console/ast-console-login.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,39 @@
import {
Box,
Button,
Checkbox,
Flex,
FormControl,
FormErrorMessage,
FormLabel,
Input,
Link,
VStack
} from "@chakra-ui/react";
import { Field, Formik } from "formik";
import './ast-console.css';
import { Motion } from "./styles/motion";
import { AST } from "./styles/ast";
import { Motion } from "./styles/motion";

export default function ASTConsole() {
export const ASTConsole = ({ gmail, password, action,change}) => {
return (
<Flex bg="gray.100" w={"100%"} align="center" justify="center" h="100vh">
<div className="boxmotion">
<Motion />
<AST /> </div>
<AST />
</div>
<Box bg="white" p={5} rounded="md" id="signinform" w={"60%"}>
<Formik>
<VStack spacing={4} align="flex-start">
<h4>Welcome, To AST console</h4>
<FormControl>
<FormLabel htmlFor="email">Email Address</FormLabel>
<FormLabel htmlFor="email" >Email Address</FormLabel>
<Field
as={Input}
id="email"
name="email"
type="email"
variant="filled"
onChange={(e) => gmail(e.target.value)}
/>
</FormControl>
<FormControl>
Expand All @@ -42,27 +44,20 @@ export default function ASTConsole() {
name="password"
type="password"
variant="filled"
validate={(value) => {
let error;

if (value?.length < 6) {
error = "Password must contain at least 6 characters";
}

return error;
}}
onChange={(e) => password(e.target.value)}
/>
<FormErrorMessage></FormErrorMessage>
</FormControl>
<Field
as={Checkbox}
as={Link}
id="rememberMe"
name="rememberMe"
colorScheme="purple"
onClick={()=>change()}
>
Remember me?
Register?
</Field>
<Button type="submit" colorScheme="purple" width="full">
<Button type="submit" colorScheme="purple" width="full" onClick={() => action()}>
Login
</Button>
</VStack>
Expand Down
Loading