diff --git a/README.md b/README.md index 7c70a62d..09a134e6 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,320 @@ -# **Workshop Booking** +# FOSSEE Workshop Booking — UI/UX Enhancement -> This website is for coordinators to book a workshop(s), they can book a workshop based on instructors posts or can propose a workshop date based on their convenience. +> **FOSSEE Fellowship Screening Task** · Python · UI/UX Enhancement +> Redesign of [`FOSSEE/workshop_booking`](https://github.com/FOSSEE/workshop_booking) with a focus on performance, modern UI, responsiveness, accessibility, and SEO using React. +--- -### Features -* Statistics - 1. Instructors Only - * Monthly Workshop Count - * Instructor/Coordinator Profile stats - * Upcoming Workshops - * View/Post comments on Coordinator's Profile - 2. Open to All - * Workshops taken over Map of India - * Pie chart based on Total Workshops taken to Type of Workshops. +## Table of Contents -* Workshop Related Features - > Instructors can Accept, Reject or Delete workshops based on their preference, also they can postpone a workshop based on coordinators request. +- [Visual Showcase](#visual-showcase) +- [Project Structure](#project-structure) +- [Setup — Django Backend](#setup--django-backend) +- [Setup — React Frontend](#setup--react-frontend) +- [Files Changed](#files-changed) +- [Frontend Architecture](#frontend-architecture) +- [Reasoning](#reasoning) +- [Submission Checklist](#submission-checklist) -__NOTE__: Check docs/Getting_Started.md for more info. +--- + +## Visual Showcase + +### Before vs After + +| Page | Before | After | +|------|--------|-------| +| **Workshop Types** | Plain table, no search, no card layout | Responsive card grid with live React-powered search filter | +| **Login** | Minimal card with no validation feedback | Inline React form validation, password visibility toggle | +| **Statistics** | Side-by-side layout breaks on mobile | Collapsible mobile filter sidebar, Recharts bar charts | +| **Workshop Status** | Raw tables for accepted/proposed workshops | React tab interface separating Accepted & Proposed | +| **Register** | `form.as_table` dump | Styled two-column grid with password strength indicator | +| **Profile** | Basic table layout | Gradient profile card with clean field rows | + +

+ +

+

+ +

+ +--- + +## Project Structure + +``` +workshop_booking/ ← Django project root +├── cms/ +├── docs/ +├── statistics_app/ +│ └── templates/statistics_app/ +│ └── workshop_public_stats.html ← Enhanced +├── teams/ +├── workshop_app/ +│ ├── static/workshop_app/css/ +│ │ └── base.css ← Full redesign +│ └── templates/workshop_app/ +│ ├── base.html ← React CDN + Google Fonts + SEO +│ ├── login.html ← React form validation +│ ├── register.html ← Styled fields + password strength +│ ├── workshop_type_list.html ← Card grid + live search +│ ├── workshop_type_details.html ← Clean detail card +│ ├── propose_workshop.html ← Mobile-friendly form + T&C modal +│ ├── workshop_status_coordinator.html ← React tabs +│ └── view_profile.html ← Profile card + edit form +├── workshop_frontend/ ← Standalone React SPA (Vite + Tailwind) +│ ├── index.html +│ ├── package.json +│ ├── tailwind.config.js +│ ├── postcss.config.js +│ └── src/ +│ ├── main.jsx +│ ├── App.jsx ← React Router v6 routes +│ ├── index.css ← Tailwind + global styles +│ ├── mockData.js ← Mirrors Django models exactly +│ ├── components/ +│ │ ├── Navbar.jsx ← Responsive + mobile hamburger +│ │ └── Layout.jsx ← Shell with navbar + footer +│ └── pages/ +│ ├── Home.jsx ← Dashboard + hero banner +│ ├── Login.jsx ← Validation + password toggle +│ ├── Register.jsx ← All fields + password strength +│ ├── WorkshopTypeList.jsx ← Card grid + search + pagination +│ ├── WorkshopTypeDetail.jsx +│ ├── ProposeWorkshop.jsx ← Date picker + T&C modal +│ ├── MyWorkshops.jsx ← Accepted/Proposed tabs +│ ├── Statistics.jsx ← Recharts + filter sidebar + table +│ └── Profile.jsx ← View + inline edit +├── workshop_portal/ +├── manage.py +├── requirements.txt +└── README.md +``` + +--- + +## Setup — Django Backend + +### Prerequisites + +- Python 3.8+ +- pip +- MySQL or SQLite database + +### Steps + +```bash +# 1. Clone the repository +git clone https://github.com/ViggiXDevp/workshop_booking.git +cd workshop_booking + +# 2. Create and activate virtual environment +python -m venv venv +source venv/bin/activate # Windows: venv\Scripts\activate + +# 3. Install dependencies +pip install -r requirements.txt + +# 4. Configure local settings +cp local_settings.py.example local_settings.py +# Edit local_settings.py — set SECRET_KEY and DATABASE settings + +# 5. Run migrations +python manage.py migrate + +# 6. Create superuser (optional) +python manage.py createsuperuser + +# 7. Collect static files +python manage.py collectstatic + +# 8. Start the server +python manage.py runserver +``` + +Visit `http://127.0.0.1:8000` in your browser. + +--- + +## Setup — React Frontend + +The `workshop_frontend/` folder is a standalone React SPA built with Vite + Tailwind CSS. It runs independently for UI development and visual demonstration. + +### Prerequisites + +- Node.js 18+ ([download](https://nodejs.org/)) +- npm 9+ + +### Steps + +```bash +# From the repo root +cd workshop_frontend + +# Install dependencies +npm install + +# Start development server +npm run dev +``` + +Open **http://localhost:5173** in your browser. + +### Build for Production + +```bash +npm run build +# Output → workshop_frontend/dist/ +``` + +### Frontend Routes + +| Route | Page | Description | +|-------|------|-------------| +| `/` | Home | Dashboard with hero banner + quick-access cards | +| `/login` | Login | Sign in with client-side validation | +| `/register` | Register | Coordinator registration with all Django fields | +| `/workshop-types` | WorkshopTypeList | Card grid with live search + pagination | +| `/workshop-types/:id` | WorkshopTypeDetail | Workshop details + T&C | +| `/propose` | ProposeWorkshop | Proposal form with date picker + T&C modal | +| `/my-workshops` | MyWorkshops | Accepted & Proposed tab view | +| `/statistics` | Statistics | Recharts charts + filter sidebar + data table | +| `/profile` | Profile | View + edit user profile | + +### Frontend Tech Stack + +| Tool | Purpose | +|------|---------| +| [Vite](https://vitejs.dev/) | Build tool & dev server | +| [React 18](https://react.dev/) | UI framework | +| [React Router v6](https://reactrouter.com/) | Client-side routing | +| [Tailwind CSS v3](https://tailwindcss.com/) | Utility-first styling | +| [Recharts](https://recharts.org/) | Bar charts for statistics | +| [Lucide React](https://lucide.dev/) | Icon set | + +### Mock Data (`src/mockData.js`) + +All data mirrors the Django models exactly: + +- `workshopTypes` → `WorkshopType` model (name, duration, description, T&C) +- `workshops` → `Workshop` model (coordinator, instructor, date, status 0/1/2) +- `currentUser` → logged-in `User` + `Profile` +- `stateChoices` → all 36 Indian states from Django `states` tuple +- `departmentChoices` → matches Django `department_choices` +- `getStatsByState()` / `getStatsByType()` → mirrors Django `WorkshopManager` aggregation + +To connect to the live Django backend, replace `mockData.js` imports with `fetch()` calls to your API endpoints and add a dev proxy in `vite.config.js`: + +```js +server: { proxy: { "/api": "http://localhost:8000" } } +``` + +--- + +## Files Changed + +### Django Templates & Static Files + +| File | What Changed | +|------|-------------| +| `workshop_app/static/workshop_app/css/base.css` | Complete redesign — CSS custom properties (design tokens), mobile-first grid, modern card/button/form/badge/table styles, fluid typography with `clamp()`, animations | +| `workshop_app/templates/workshop_app/base.html` | React 18 via CDN, Google Fonts (Plus Jakarta Sans), SEO `` + Open Graph tags, accessible navbar with Login/Register for unauthenticated users, improved footer | +| `workshop_app/templates/workshop_app/login.html` | React form with client-side validation, password show/hide toggle, `aria-invalid` / `aria-describedby`, `