An interactive economics learning platform built with React and Vite, featuring lessons, quizzes, and progress tracking powered by Firebase.
- Frontend: React 19, Vite
- Routing: React Router v6
- Styling: CSS with CSS Variables (dark theme with neon accents)
- Icons: React Icons (FontAwesome)
- Backend: Firebase (Authentication, Firestore)
- Deployment: GitHub Pages
- Total Inline Styles: ~902 instances.
- Verdict: Manageable / Safe.
- Assessment: While high, React handles inline styles efficiently. The visual "lag" concerns are unfounded at this scale. For future lessons, prefer
lessons.cssclasses for complex layouts to keep code clean, but use inline styles for dynamic values (animations, charts) without fear.
To reach the goal of 1 Lesson Per Day, we are shifting from "Hand-Crafted Components" to "Templated Content".
The Plan:
- Create Reusable Layouts: Instead of building
<div>structures for every page, we will build generic components like<LessonPage>,<ConceptCard>,<InteractiveGraph>. - Data-Driven Content: Future lessons can be defined in JSON/JS files, which the templates render automatically.
- Unified Styling: All new lessons will strictly use
lessons.cssclasses, reducing decision fatigue.
A detailed view of the current Microeconomics curriculum implementation.
ArthShastra/
βββ .github/
β βββ workflows/
β βββ (GitHub Action definitions)
β
βββ .vscode/
β βββ settings.json
β
βββ public/ # Static assets served as-is
β βββ vite.svg
β βββ (other static resources)
β
βββ src/
β βββ assets/ # Bundled assets
β β βββ react.svg
β β
β βββ components/ # Global Shared Components
β β βββ common/
β β β βββ Button.jsx
β β β βββ Input.jsx
β β βββ ui/
β β βββ Card.jsx
β β βββ Modal.jsx
β β
β βββ context/ # Global State
β β βββ AuthContext.jsx
β β
β βββ data/
β β βββ (Global static data)
β β
β βββ hooks/ # Custom React Hooks
β β βββ useScrollTop.js
β β
β βββ pages/ # Application Routes
β β βββ Home.jsx
β β βββ Home.css
β β βββ About.jsx
β β βββ About.css
β β βββ Lessons.jsx # Dashboard
β β βββ Lessons.css
β β β
β β βββ Lessons/ # π LEARING CONTENT MODULES
β β β
β β βββ css/ # π¨ CENTRALIZED STYLING
β β β βββ lessons.css # [MASTER] All Lesson Styles (5000+ lines)
β β β βββ quiz.css # Shared Quiz Styles
β β β
β β βββ components/ # π§© SHARED LESSON COMPONENTS
β β β βββ SharedQuiz.jsx
β β β βββ index.js
β β β βββ (No local CSS files here)
β β β
β β βββ data/ # π SHARED DATA
β β β βββ lesson1Data.js
β β β βββ lesson2Data.js
β β β βββ ... (Data for all lessons)
β β β
β β βββ Lesson1/ (Introduction)
β β β βββ Lesson1.jsx
β β β βββ components/
β β β βββ Introduction.jsx
β β β βββ Scarcity.jsx
β β β βββ Quiz.jsx
β β β
β β βββ Lesson2/ (Central Problems)
β β β βββ Lesson2.jsx
β β β βββ components/
β β β βββ AttainableUnattainable.jsx
β β β βββ OpportunityCost.jsx
β β β βββ PPCVisualizer.jsx
β β β βββ PPCurve.jsx
β β β βββ ProductionPossibilityCurve.jsx (Wrapper)
β β β βββ Quiz.jsx
β β β βββ SlopeMOC.jsx
β β β βββ TabularRepresentation.jsx
β β β βββ WhatHowForWhom.jsx
β β β
β β βββ Lesson3/ (Consumer Equilibrium - Utility)
β β β βββ Lesson3.jsx
β β β βββ components/
β β β βββ ConceptOfUtility.jsx
β β β βββ ConsumerEquilibrium.jsx
β β β βββ DiminishingMarginalUtility.jsx
β β β βββ LimitationsOfUtility.jsx
β β β βββ Quiz.jsx
β β β βββ SingleCommodityChart.jsx
β β β βββ TwoCommodityChart.jsx
β β β βββ WhoIsConsumer.jsx
β β β
β β βββ Lesson4/ (Indifference Curve)
β β β βββ Lesson4.jsx
β β β βββ components/
β β β βββ BudgetLine.jsx
β β β βββ ConsumerEquilibriumIC.jsx
β β β βββ IntroToIC.jsx
β β β βββ MRSConcept.jsx
β β β βββ MeaningOfIC.jsx
β β β βββ PropertiesOfIC.jsx
β β β βββ Quiz.jsx
β β β
β β βββ Lesson5/ (Theory of Demand)
β β β βββ Lesson5.jsx
β β β βββ components/
β β β βββ DemandCurve.jsx
β β β βββ DemandDescription.jsx
β β β βββ DemandFunction.jsx
β β β βββ LawOfDemand.jsx
β β β βββ Quiz.jsx
β β β βββ ShiftVsMovement.jsx
β β β
β β βββ Lesson6/ (Elasticity)
β β β βββ Lesson6.jsx
β β β βββ components/
β β β βββ Applications.jsx
β β β βββ ConceptAndMeasurement.jsx
β β β βββ FactorsAffecting.jsx
β β β βββ InteractiveCurveSimulator.jsx
β β β βββ InteractiveCurveSimulatorMobile.jsx
β β β βββ Introduction.jsx
β β β βββ Quiz.jsx
β β β βββ TypesOfElasticity.jsx
β β β
β β βββ Lesson7/ (Production Function)
β β β βββ Lesson7.jsx
β β β βββ components/
β β β βββ AssumptionsLimitations.jsx
β β β βββ PracticeProblems.jsx
β β β βββ ProductionFunction.jsx
β β β βββ ProductionSchedule.jsx
β β β βββ Quiz.jsx
β β β βββ RealWorldExamples.jsx
β β β βββ ReturnsToFactorChart.jsx
β β β βββ StagesOfProduction.jsx
β β β
β β βββ Lesson8/ (Cost)
β β βββ Lesson8.jsx
β β βββ components/
β β βββ BreakEvenShutdown.jsx
β β βββ CostCurvesChart.jsx
β β βββ CostRelationships.jsx
β β βββ PriceCeilingFloor.jsx
β β βββ ShiftsInEquilibrium.jsx
β β βββ SupplyDemandEquilibrium.jsx
β β
β βββ StatsLessons/ # π STATISTICS MODULES (Consolidated Design System)
β βββ Lesson1/ (Introduction & Scope)
β βββ Lesson2/ (Collection of Data)
β βββ Lesson3/ (Organization of Data)
β βββ Lesson4/ (Presentation - Tabular)
β βββ Lesson5/ (Presentation - Diagrammatic)
β βββ Lesson13/ (Project Work & Case Study)
β βββ ...
β
β βββ services/ # Backend Logic
β β βββ firebase.js
β β
β βββ App.css
β βββ App.jsx
β βββ index.css
β βββ main.jsx
β
βββ .gitignore
βββ CLAUDE.md
βββ eslint.config.js
βββ index.html
βββ package-lock.json
βββ package.json
βββ vite.config.js
βββ README.md
- Microeconomics: Grade 12 (Pending)
- IED: Grade 12 (Pending)
- Statistics: Construction Started π§
Each lesson features a unique visual identity to keep learning engaging:
| Lesson | Style Theme |
|---|---|
| Lesson 1 | Leonardo da Vinci Notebook |
| Lesson 2 | Comic Book / Graphic Novel |
| Lesson 3 | Brutalism Design |
| Lesson 4 | Brutalism Design |
| Lesson 5 | Comic Book Theme |
| Lesson 6 | Brutalism Design |
| Lesson 7 | Modern Abstract |
| Lesson 8 | Industrial Factory Theme |
| Lesson 9 | Corporate Finance Gold |
| Lesson 10 | Strategic Balance / Game Theory |
| Lesson 11 | Logistics & Supply Chain |
| Lesson 12 | Marketplace Simulation |
| Lesson 13 | Terminal / Hacker Theme |
| Stats (All) | Unified Vintage & Modern Mix |
| - System | Consolidated for Efficiency |
The ArthShastra curriculum covers the entire Grade 11 Microeconomics syllabus, broken down into interactive modules.
Theme: Leonardo da Vinci Notebook
- Concept of Economics: Scarcity, Choice, and Wealth.
- Micro vs Macro: The fundamental differences.
- Positive vs Normative: Scientific analysis vs Value judgments.
- Economy Types: Centrally Planned, Market, and Mixed Economies.
Theme: Comic Book / Graphic Novel
- What to Produce?: The allocation of resources.
- How to Produce?: Labor intensive vs Capital intensive techniques.
- For Whom to Produce?: Distribution of income and welfare.
- PPC (Production Possibility Curve): Shifts, Rotations, and Opportunity Cost.
Theme: Brutalism Design
- Total & Marginal Utility: The law of diminishing returns.
- Single Commodity Case: Equilibrium condition (MUx = Px).
- Two Commodity Case: Law of Equi-Marginal Utility.
Theme: Brutalism Design
- Indifference Statistics: Monotonic preferences and the MRS.
- Budget Line: Evaluation of purchasing power and price ratio.
- Consumer's Equilibrium: Tangency of IC and Budget Line.
π―οΈ Lesson 5: Theory of Demand
Theme: Comic Book Theme
- Law of Demand: Inverse relationship between Price and Quantity.
- Determinants: Income, Price of Related Goods (Substitutes/Complements).
- Exceptions: Giffen Goods and Veblen Goods.
Theme: Brutalism Design
- Measurement: Percentage Method and Geometric Method.
- Degrees: Perfectly Elastic to Perfectly Inelastic.
- Factors: Nature of commodity, Time period, Availability of substitutes.
Theme: Modern Abstract
- Short Run vs Long Run: Fixed and Variable factors.
- Law of Variable Proportions: TP, AP, and MP relationships.
- Returns to a Factor: Increasing, Diminishing, and Negative returns.
Theme: Industrial Factory Theme
- Categories: Fixed vs Variable, Explicit vs Implicit.
- Cost Curves: The 'U' shape of AC, AVC, and MC.
- Relationships: Why MC intersects AC at its minimum.
Theme: Corporate Finance Gold
- TR, AR, MR: Definitions and calculations.
- Market Forms: Revenue curves in Perfect vs Imperfect completion.
- Behavior: Relationship between TR, AR, and MR.
Theme: Strategic Balance / Game Theory
- Conditions: MC = MR and MC must be rising.
- Analysis: Break-even point and Shutdown point.
- Examples: Numerical determination of profit maximization.
Theme: Logistics & Supply Chain
- Determinants: Price, Tech, Input prices, Taxes.
- Law of Supply: Direct relationship between Price and Quantity.
- Elasticity: Responsiveness of supply to price changes.
ποΈ Lesson 12: Forms of Market
Theme: Marketplace Simulation
- Perfect Competition: Large buyers/sellers, homogeneous product.
- Monopoly: Single seller, price maker.
- Monopolistic Competition: Product differentiation.
- Oligopoly: Interdependence and cartels.
Theme: Terminal / Hacker Theme
- Equilibrium Price: Intersection of Demand and Supply.
- Shifts: Effect of change in demand and supply on equilibrium.
- Price Control: Price Ceilings and Price Floors.
Theme: Vintage Newspaper
- Nature of Statistics: Plural and Singular sense.
- Importance: Why we need data to stop guessing.
- Distrust of Stats: "Lies, Damned Lies, and Statistics."
Theme: Modern Data Dashboard
- Primary vs Secondary: Direct vs Indirect collection.
- Census vs Sample: When to count everyone vs when to guess.
- Sampling Errors: Why your data might be lying to you.
Theme: Project Archive / Case Study
- The Case Study: Real-world data analysis engine.
- Project Steps: From hypothesis to conclusion.
- Data Visualization: Making numbers look less boring.
ArthShastra is built for scale. Understanding the architecture is key to contributing.
src/
βββ assets/ # Global static images/icons
βββ components/ # Global shared UI (Buttons, Modals, Cards)
βββ context/ # React Context (Auth, Theme)
βββ css/ # Global Variables (index.css)
βββ data/ # Global static data
βββ hooks/ # Custom Hooks (useScrollTop, usesAuth)
βββ pages/
β βββ Home/ # Landing Page
β βββ Lessons/ # THE CORE ENGINE
β β βββ css/ # Centralized Lesson Styles
β β β βββ lessons.css
β β βββ components/ # Shared Lesson Components
β β β βββ Quiz.jsx
β β βββ Lesson1/ # Individual Lesson Modules
β β βββ Lesson2/
β β βββ ...
βββ services/ # Backend Integrations (Firebase)
βββ App.jsx # Main Router
- Vite: Selected for HMR speed. We strictly use
vite.config.js. - No Redux: State is localized or handled via Context API. This reduces boilerplate.
- Firebase: Used for:
- Auth: Google/Email Sign-in.
- Firestore: Storing user progress (
users/{uid}/progress/{lessonId}). - Performance: Real-time listeners are minimized to save costs.
- CSS Variables: We use a robust system of CSS variables for theming.
--card-bg: Dark mode card backgrounds.--neon-blue: Primary accent color.--text-primary: Main text color.
We use a "Atomic Design" inspired approach but simplified for educational content.
Note
Unit 5 Strategy Shift: In Microeconomics, every lesson was a "unique visual invention" (Comic, Brutalism, Industrial). While artistic, this was too time-consuming to develop.
For Statistics, we have shifted to a Unified Themes Architecture. All Stats lessons now share a high-end Vintage Newspaper / Modern Data Dashboard hybrid. This ensures a professional "Researcher Archive" vibe throughout the unit.
Every lesson page (LessonX.jsx) follows this strict layout:
- Header: Back button + Breadcrumbs.
- Nav: Horizontal scrolling tab bar for sections.
- Main: The content area rendering the active component.
- Footer: Prev/Next buttons + Progress dots.
We have three types of cards in lessons.css:
.content-card: Standard padding, white/dark bg, subtle shadow..highlight-card: Colored border, used for definitions/formulas..interactive-card: Hover effects, used for clickable elements.
The Quiz.jsx component is a complex engine that supports:
- Multiple Choice: Standard options.
- True/False: Boolean logic.
- Feedback: Immediate detailed explanation on correct/incorrect answers.
- Score Tracking: Auto-logs to Firebase upon completion.
Want to add Lesson 14? Follow the "Factory Model":
Copy the folder structure of Lesson12 to Lesson14.
Rename all files from 12 to 14.
Edit data/lesson14Data.js. This is where you define the structure.
export const lesson14Data = {
title: "National Income",
sections: [
{ id: 'intro', name: 'Introduction', icon: FaBook },
{ id: 'methods', name: 'Measurement', icon: FaCalculator }
],
// ...
}Create atomic components in Lesson14/components/.
Rule: Do NOT write inline CSS. Use classes from lessons.css.
Import your components into Lesson14.jsx and map them in the renderActiveSection switch statement.
Add the route in App.jsx:
<Route path="/lessons/14" element={<Lesson14 />} />1. "Firebase API Key Missing"
- Ensure you have a
.envfile in the root. - It must contain
VITE_FIREBASE_API_KEY, etc. - Restart the dev server after creating
.env.
2. "Module Not Found"
- Check your imports. We use absolute paths or relative paths.
- Ensure case sensitivity (Windows ignores it, Linux enforces it).
3. "Styles Not Applying"
- Did you import
../../css/lessons.css? - Are you using valid class names? Check
lessons.cssfor typos.
Copyright Β© 2026 ArthShastra Education. Built for CBSE Grade 11 & 12 Economics students. Concept & Code by TRINNO ASPHALT.
βEconomics is the art of making the most of life.β - George Bernard Shaw
npm install
npm run devDocumentation updated: Jan 2026 - CSS Architecture Consolidated