A small study app for practising formulas from ENT4230 Topics 1–4.
Each round contains 10 calculation tasks with realistic randomized values. Tasks marked as high priority in the lecture material appear more frequently, while standard tasks are still included for broader practice.
Open the ENT4230 Task Generator
The site is hosted by GitHub Pages and is automatically rebuilt when changes are pushed to main.
- 10 different tasks per round
- Randomized values within realistic ranges
- Seven high-priority and three standard tasks per round
- Financial information displayed as income statements, balance sheets, budgets, or other suitable schedules
- Single-formula and multi-step calculations
- Formula hints shown in a dismissible popup
- Immediate answer feedback and an end-of-round summary
- Responsive layout for desktop and mobile
- Norwegian number formatting with answers accepted using commas or decimal points
The project uses pnpm.
pnpm install
pnpm devOpen http://localhost:5173 in a browser.
pnpm dev # Start the development server
pnpm lint # Run ESLint
pnpm build # Type-check and create a production build
pnpm preview # Preview the production buildThe workflow in .github/workflows/deploy-pages.yml installs dependencies, builds the Vite app, and publishes the dist directory to GitHub Pages.
Vite uses /ent4230-task-generator/ as its production base path because this is a project site rather than a user site.
src/
├── components/ Reusable interface components
├── features/
│ └── practice/
│ ├── hooks/ Round state and answer handling
│ ├── templates/ Task generators grouped by topic
│ ├── core.ts Shared task types, formatting, and random values
│ ├── generateRound.ts Round selection and priority weighting
│ └── parseAnswer.ts User-input normalization
├── App.tsx Application composition
├── App.css Component styling
├── index.css Global styling
└── main.tsx React entry point
The task templates are divided into:
topic1.ts— financial statements and cash flowtopic2Analysis.ts— financial-statement analysis and profitabilitytopic2Ratios.ts— leverage, liquidity, activity, and per-share ratiostopic3.ts— cost-volume-profit analysis, forecasting, and budgetstopic4.ts— working capital, inventory, discounts, and cash management
A new round randomly selects:
- 7 high-priority templates
- 3 standard-priority templates
A template can only appear once in a round. NumberBank generates values from the ranges defined by each template and avoids recently used values where possible.
Each template defines:
- The question and optional instructions
- The financial statement or schedule shown to the student
- The correct answer and accepted tolerance
- One or more formula hints
- The explanation displayed after answering
- Open the appropriate file in
src/features/practice/templates/. - Add or update a template with a unique
id. - Set its priority to
highorstandard. - Generate inputs through the supplied
NumberBank. - Use the
taskhelper to define the answer type, statement rows, hints, and solution. - Keep terminology consistent with the lecture slides.
- Run
pnpm lintandpnpm buildbefore committing.
Authored source files should remain focused and stay below approximately 250 lines.