Skip to content

Commit f48e59a

Browse files
author
subrahmanyam024
committed
docs: add assessment readme with customization details
1 parent f08aa37 commit f48e59a

File tree

2 files changed

+98
-0
lines changed

2 files changed

+98
-0
lines changed

ASSESSMENT_README.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Mazer – Customized Assessment Build
2+
3+
This repo is a customized fork of Mazer focused on UI tweaks and data-driven components for a front‑end assessment.
4+
5+
- Original template: https://github.com/zuramai/mazer
6+
- Fork: https://github.com/subrahmanyam024/mazer
7+
8+
## What’s included
9+
- Data-bound dashboard KPIs and chart (reads from JSON)
10+
- New Products page (search + pagination from JSON)
11+
- Theme tweaks (primary color, rounded cards, active sidebar)
12+
- Sidebar navigation entry for Products
13+
- CDN fallbacks for vendor scripts during dev
14+
15+
## Getting started
16+
1) Install and run
17+
```
18+
npm install
19+
npm run dev
20+
# open http://localhost:5173
21+
```
22+
23+
2) Build
24+
```
25+
npm run build
26+
```
27+
28+
## Data source
29+
- JSON: `src/assets/data/data.json`
30+
- Loader: `src/assets/js/services/dataService.js`
31+
- Fetch path is relative for portability:
32+
- `fetch('assets/data/data.json', { cache: 'no-store' })`
33+
34+
## Dashboard data binding
35+
- Page: `src/index.html`
36+
- Four KPI hooks via `data-kpi`:
37+
- `data-kpi="totalUsers"`, `activeSessions`, `revenueToday`, `conversionRate`
38+
- Script: `src/assets/static/js/pages/dashboard.js`
39+
- Imported as a module in `index.html`
40+
- Loads JSON and updates KPI elements
41+
- Updates the main ApexCharts series from `salesSeries`
42+
43+
## Products page (data-driven table)
44+
- Page: `src/products.html`
45+
- Script: `src/assets/static/js/pages/products.js`
46+
- Features:
47+
- Pulls `topProducts` from `data.json`
48+
- Client-side search (SKU/Name)
49+
- Simple pagination (10 per page)
50+
51+
## Theme customization
52+
- File: `src/assets/scss/_custom.scss`
53+
- Primary color `#6b5bff`
54+
- Rounded cards
55+
- Active sidebar link highlight
56+
- Included from `src/assets/scss/app.scss`
57+
58+
## Navigation
59+
- Vertical sidebar items: `src/sidebar-items.json`
60+
- Added `Products``products.html`
61+
- Horizontal menu items (for reference): `src/horizontal-menu-items.json`
62+
63+
## Vendor/CDN notes
64+
- During dev, some vendor files under `assets/extensions` may be missing. We use CDN for:
65+
- Perfect Scrollbar: injected in `src/layouts/master.html`
66+
- ApexCharts: injected in `src/index.html`
67+
- You can switch back to local packages by ensuring Vite copies extensions (see `vite.config.js` modulesToCopy).
68+
69+
## Vite config
70+
- `vite.config.js`
71+
- `base` is `./` in dev and `/mazer/` in production (helpful for GitHub Pages)
72+
- Static assets served from `src/assets/static`
73+
74+
## Branch and commit
75+
- Suggested branch: `feat/custom-assessment`
76+
- Example commit:
77+
`feat: data-bound dashboard, products page, theme tweaks, CDN fixes`
78+
79+
## Key files changed/added
80+
- `src/index.html` (KPI hooks, module script, CDN ApexCharts)
81+
- `src/assets/static/js/pages/dashboard.js` (data binding)
82+
- `src/assets/js/services/dataService.js` (data loader)
83+
- `src/assets/data/data.json` (sample data)
84+
- `src/products.html`, `src/assets/static/js/pages/products.js`
85+
- `src/assets/scss/_custom.scss`, `src/assets/scss/app.scss`
86+
- `src/layouts/master.html` (Perfect Scrollbar CDN)
87+
- `src/sidebar-items.json` (Products menu)
88+
- `vite.config.js` (prod base path)
89+
90+
## References
91+
- Mazer template: https://github.com/zuramai/mazer
92+
93+

src/sidebar-items.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@
236236
"url": "table.html",
237237
"icon": "grid-1x2-fill"
238238
},
239+
{
240+
"name": "Products",
241+
"url": "products.html",
242+
"icon": "bag-fill"
243+
},
239244
{
240245
"name": "Datatables",
241246
"key": "table-datatable",

0 commit comments

Comments
 (0)