mammoth-calculator

byumang suthar

create the basic and scientific 2 page calculator

LandingScientificCalculatorBasicCalculator
Landing

Comments (0)

No comments yet. Be the first!

Project Tasks19

#1

Implement Navbar for Landing

Completed in 48h 52m 38s
Done

As a frontend developer, implement the Navbar section for the Landing page. Build the `Navbar` component using `useState` (menuOpen, scrolled) and `useEffect` for scroll detection (`window.scrollY > 40` threshold) and body overflow locking when mobile menu is open. Render an animated SVG logo with `motion.rect` path-draw animations (`strokeDashoffset` from 128→0 and 56→0) using framer-motion. Implement the mobile slide-in menu with `menuVariants` (x: '100%'→0), `overlayVariants` (opacity), and staggered `linkContainerVariants`/`linkItemVariants` for nav links (Landing, BasicCalculator, ScientificCalculator). Apply `nb-bar--scrolled` class conditionally. Note: this component may already exist from a previous page if Navbar is shared.

Task Progress
100%
ExecutionCompleted
AI 88%
Human 12%
High Priority
1 day
Frontend Developer
#12

Setup Global Theme System

Backlog

As a Frontend Developer, set up the global theme and design system for the Mammoth-Calculator app. Define CSS custom properties and/or a theme config file for all SRD-specified colors: primary (#1A5276), primary_light (#5499C7), secondary (#D35400), accent (#F1C40F), highlight (#F39C12), bg (#F4F6F7), surface (rgba(255,255,255,0.9)), text (#2C3E50), text_muted (#7F8C8D), border (rgba(44,62,80,0.2)). Set up global font styles, reset CSS, and any shared utility classes. Ensure theme tokens are consumable by all page components.

AI 70%
Human 30%
High Priority
0.5 days
Frontend Developer
#13

Setup DB Migrations Alembic

To Do

As a Backend Developer, initialize Alembic for database migrations with MySQL/MariaDB. Set up alembic.ini, env.py, and the versions/ directory. Create an initial migration baseline. Define any application-level tables needed (e.g., calculation history or locale settings if required). Ensure the migration scripts run cleanly on docker-compose startup and in Kubernetes. Note: The SRD specifies MySQL or MariaDB with Alembic; even a minimal schema baseline is required.

AI 60%
Human 40%
Medium Priority
1 day
Backend Developer
#2

Implement LandingHero for Landing

To Do

As a frontend developer, implement the `LandingHero` section for the Landing page. Use `useRef` + `useInView` (margin: '-80px', once: true) to trigger scroll-based entrance. Animate the headline ('Powerful Calculator, Anywhere') character-by-character using `charVariants` (opacity 0→1, y 24→0, rotateX -40→0) with per-character stagger delay (`i * 0.03`). Animate subheadline words with `wordVariants` (delay: 0.6 + i*0.06). Render a `badgeVariants` badge and CTA buttons via `ctaContainerVariants`/`ctaItemVariants` with staggerChildren 0.12, delayChildren 1.2. Implement `MagneticButton` sub-component using `useRef`, `useState` offset {x,y}, `onMouseMove`/`onMouseLeave` with 0.2 magnetic factor and spring animation (stiffness 250, damping 18, mass 0.6). Render animated gradient background (`lh-gradient-bg`), parallax shape layer (`lh-parallax-bg`, transform based on CSS `--scroll` variable), and `lh-shape` decorative elements.

Depends on:#1
AI 85%
Human 15%
High Priority
1.5 days
Frontend Developer
#3

Implement LandingFeatures for Landing

Backlog

As a frontend developer, implement the `LandingFeatures` section for the Landing page. Render three feature items from the `FEATURES` array (arithmetic, scientific, switching) using `useState` for active selection. Implement `ModeToggle` sub-component with `useState(isScientific)` controlling a slide toggle UI. Render custom SVG icon components: `CalcIcon`, `ScienceIcon`, `ToggleIcon` mapped via `iconMap`. Use `AnimatePresence` for feature detail transitions. Each feature card shows title, hint, description, example (when non-null), and exampleIcon. Apply framer-motion entrance animations for cards and use `motion` + `AnimatePresence` for toggling active feature content.

Depends on:#1
AI 87%
Human 13%
High Priority
1 day
Frontend Developer
#4

Implement LandingCalculator3D for Landing

Paused

As a frontend developer, implement the `LandingCalculator3D` section for the Landing page. Build an interactive 3D calculator using `@react-three/fiber` (`Canvas`, `useFrame`), `@react-three/drei` (`OrbitControls`, `RoundedBox`, `Text`), and `three` (THREE). Implement `CalcButton3D` sub-component with `useRef`, `useState(pressed)`, `targetY`/`currentY` refs, and `useFrame` for smooth press animation (currentY lerp toward -0.06 on press). Use `CALC_BUTTONS` layout data (5 rows including wide '0' button) with color-coded keys: clear (#D35400), operator (#F39C12), function (#5499C7), digit (#2C3E50). Handle `onPointerDown`, `onPointerUp`, `onPointerOver`, `onPointerOut` events with cursor changes. Wrap in a `motion`/`AnimatePresence` overlay for display readout. Use `useMemo`, `useRef`, `useEffect`, `useState` for calculator state management and scene orchestration.

Depends on:#1
Task Progress
ETA 5:1248%
ExecutionPhase 4: Execution & Smart Verification
AI 80%
Human 20%
High Priority
2 days
Frontend Developer
#5

Implement LandingModes for Landing

Backlog

As a frontend developer, implement the `LandingModes` section for the Landing page. Use `useState('basic')` for `activeMode` toggling between 'basic' and 'scientific' tabs. Render `basicOps` (4 items: +, −, ×, ÷) and `scientificOps` (4 items: sin, log, xⁿ, π) operation arrays. Implement `FlipCard` sub-component with `useState(flipped)`, handling `onClick`, `onMouseEnter` (flip true), `onMouseLeave` (flip false) interactions. Each FlipCard renders a front face (symbol, name, desc, arrow SVG) and back face (example, label) using CSS 3D perspective transform with `lm-flip-card--flipped` class. Animate card entrance with `whileInView` (opacity 0→1, y 20→0, once: true, margin: '-40px'). Render a column-level hover handler (`handleColumnEnter`) that sets activeMode.

Depends on:#1
AI 88%
Human 12%
High Priority
1 day
Frontend Developer
#6

Implement LandingUserFlows for Landing

Backlog

As a frontend developer, implement the `LandingUserFlows` section for the Landing page. Render two `FlowPath` sub-components: one for `basicSteps` (5 steps) and one for `scientificSteps` (5 steps), controlled by a `variant` prop ('basic'/'scientific'). In `FlowPath`, use `useRef` (svgRef, pathRef, stepsContainerRef, timelineRef), `useState` (pathLength, activeSteps), and `useEffect` to measure SVG path `getTotalLength()` and initialize GSAP `strokeDashoffset`. Animate the SVG connector path draw via `gsap.timeline()` triggered by `sectionInView` prop (from parent `useInView` with `margin: '-80px'`). Reveal step indicators sequentially by pushing to `activeSteps` state. Each step renders title and desc text. Import `gsap` for path and step animations alongside `framer-motion`'s `useInView`.

Depends on:#1
AI 82%
Human 18%
High Priority
1.5 days
Frontend Developer
#7

Implement LandingStats for Landing

Backlog

As a frontend developer, implement the `LandingStats` section for the Landing page. Render 4 `StatCard` sub-components from `STATS` array (50ms, 15+, 100%, 2s) using `useInView` on a wrapper ref. Each `StatCard` uses `useRef` (numberRef, progressRef), `hasAnimated` ref guard, and framer-motion `animate()` to count up from 0 to `stat.number` over 1.6s with `delay: index * 0.15` and ease `[0.22, 1, 0.36, 1]`. On each `onUpdate`, update `numberRef.current.textContent` and calculate SVG ring `strokeDashoffset` from `RING_CIRCUMFERENCE * (1 - progress)` where `RING_RADIUS=48` and `RING_CIRCUMFERENCE=2*Math.PI*48`. Render Lucide icons (`Zap`, `Target`, `Smartphone`, `Sliders`). Animate card entrance with `motion.div` (opacity 0→1, y 40→0) staggered by `index * 0.12`.

Depends on:#1
AI 87%
Human 13%
Medium Priority
1 day
Frontend Developer
#8

Implement LandingPerformance for Landing

Completed in 18m 50s
Done

As a frontend developer, implement the `LandingPerformance` section for the Landing page. Use `useRef` + `useInView` (once: true, margin: '-60px') to trigger entrance animations. Render 4 performance cards from `performanceCards` array (speed, responsive, locale, scalable) using Lucide icons (`Zap`, `Smartphone`, `Globe`, `Server`). Animate cards via `staggerContainer` variants (staggerChildren: 0.1, delayChildren: 0.05) and `cardVariants` (opacity 0→1, y 24→0). Animate bottom border accent with `borderVariants` (scaleX 0→1, delay 0.3). Animate section header with `headerVariants` (opacity 0→1, y 16→0). Render parallax decorative layer (`lp-parallax-mid`) with 3 blob shapes (`lp-deco-blob--1/2/3`) using CSS `--scroll` variable transform at -0.5px multiplier. Each card shows `metric`, `title`, `desc`, and icon.

Depends on:#1
Task Progress
100%
ExecutionCompleted
AI 90%
Human 10%
Medium Priority
0.5 days
Frontend Developer
#9

Implement LandingUseCases for Landing

Backlog

As a frontend developer, implement the `LandingUseCases` section for the Landing page. Render two `PersonaCard` sub-components from `personas` array (Basic User / Student & Professional, Scientific User / Researcher & Educator). Each `PersonaCard` uses `useState(isActive)` toggled by `onHoverStart`/`onHoverEnd` and `onTouchStart`. Apply `cardVariants` with rest/hover states (backgroundColor rgba transitions). Each card features an animated morphing SVG using `motion.path` animating between `pathResting` and `pathActive` d-attribute values, and `innerResting`/`innerActive` stroke paths, keyed by `isBasic` variant. Render persona quote, author attribution, description paragraph, and a CTA `motion.a` linking to `/BasicCalculator` or `/ScientificCalculator`. Apply variant-specific stroke and fill colors (`strokeColor`, `fillColor`).

Depends on:#1
AI 86%
Human 14%
Medium Priority
1 day
Frontend Developer
#10

Implement LandingCTA for Landing

Backlog

As a frontend developer, implement the `LandingCTA` section for the Landing page. Use `useState(bursts)`, `useRef(sectionRef)`, and `useInView` (once: true, margin: '-80px'). Implement `createParticles(x, y)` factory that generates 14 particles with random angle/distance spread, random size (4-9px), and colors from `PARTICLE_COLORS` (['#F1C40F','#F39C12','#5499C7','#ffffff','#D35400']). Render `ParticleBurst` sub-component using `AnimatePresence` with `onExitComplete` cleanup; each particle animates opacity 1→0, scale 1→0, x/y→tx/ty over 0.6s easeOut. Animate section headline with `headlineVariants` (y 30→0), subheadline with `subheadlineVariants` (delay 0.15), CTA buttons via `buttonContainerVariants` (staggerChildren 0.12, delayChildren 0.35) and `buttonVariants`. Apply pulsing glow keyframe animations (`glowPrimary`, `glowSecondary`) to primary and secondary CTA buttons. Render trust indicators with `trustVariants` (delay 0.6).

Depends on:#1
AI 87%
Human 13%
High Priority
1 day
Frontend Developer
#11

Implement Footer for Landing

Backlog

As a frontend developer, implement the `Footer` section for the Landing page. Render 4 link columns from `linkColumns` array (Product, Docs, Support, About) each with 4 `FooterLink` sub-components. Each `FooterLink` uses `useState(hovered)` with `onMouseEnter`/`onMouseLeave` and renders a `motion.div` underline that animates `scaleX` 0→1 on hover (duration 0.3, easeOut). Render `SocialIcon` sub-components using `motion.div` with `whileHover` (rotate 180°, scale 1.2, duration 0.3 easeInOut). Render a parallax decorative background layer (`ftr-parallax-bg`) with 3 shape divs using CSS `--scroll` variable at -0.2px multiplier. Render brand logo area with `ftr-logo-icon` 'M' monogram and brand name 'mammoth-calculator'. Note: this Footer component may already exist from another page if shared. Note: this Footer component may already exist from a previous page if Footer is shared.

Depends on:#1
AI 90%
Human 10%
Medium Priority
0.5 days
Frontend Developer
#14

Build Calculator API Endpoints

Backlog

As a Backend Developer, implement FastAPI endpoints to support both basic and scientific calculator operations. Expose POST /api/calculate/basic accepting operands and operator (add, subtract, multiply, divide) and returning the result. Expose POST /api/calculate/scientific accepting an expression or function type (sin, cos, tan, log, ln, power, sqrt, pi, etc.) with arguments and returning the result. Include input validation, error handling (e.g., division by zero, domain errors), and appropriate HTTP status codes. Add CORS middleware to allow frontend origin. Note: these endpoints are consumed by both BasicCalculator and ScientificCalculator frontend pages.

Depends on:#13
Waiting for dependencies
AI 65%
Human 35%
High Priority
2 days
Backend Developer
#15

Implement Localization Indian Locale

Backlog

As a Frontend Developer, implement locale-specific support for Indian users as specified in SRD non-functional requirements. Configure number formatting using Intl.NumberFormat with 'en-IN' locale for currency (INR) and number display. Set default timezone to 'Asia/Kolkata'. Expose a locale context or utility hook (useLocale) for consistent formatting across both calculator pages. Ensure the calculator display respects locale-specific decimal separators and grouping conventions.

Depends on:#12
Waiting for dependencies
AI 60%
Human 40%
Medium Priority
0.5 days
Frontend Developer
#16

Implement BasicCalculator Page

Backlog

As a Frontend Developer, implement the full BasicCalculator page. Build a responsive calculator UI supporting addition, subtraction, multiplication, and division. Implement calculator state management (current input, operator, result, display string) using useState/useReducer. Render digit buttons (0-9), operator buttons (+, -, ×, ÷), clear (C/AC), equals (=), and decimal (.) buttons. Apply framer-motion spring animations on button press as per the Signature Design Concept. Implement a digital LED-style display for number output. Include a mode-switch button/link to navigate to ScientificCalculator. Apply theme colors from the design system. Ensure full mobile responsiveness. Note: this page depends on backend API task (temp_backend_calc_api) for server-side calculation; wire API calls on equals press and handle error states.

Depends on:#12#15
Waiting for dependencies
AI 65%
Human 35%
High Priority
3 days
Frontend Developer
#17

Implement ScientificCalculator Page

Backlog

As a Frontend Developer, implement the full ScientificCalculator page. Build a responsive scientific calculator UI extending the basic layout with additional function buttons: sin, cos, tan, log, ln, x^n, sqrt, π, e, ( ). Implement expression parsing and state management for multi-token expressions. Apply framer-motion spring animations on button press. Implement a digital LED-style display showing the full expression and result. Include a mode-switch button/link back to BasicCalculator. Apply theme colors from the design system. Ensure full mobile responsiveness with a compact layout for small screens. Note: this page depends on backend API task (temp_backend_calc_api) for server-side evaluation; wire API calls on equals press and handle domain error states (e.g., log of negative number).

Depends on:#12#15
Waiting for dependencies
AI 65%
Human 35%
High Priority
3.5 days
Frontend Developer
#18

Integrate BasicCalculator Frontend API

Backlog

As a Tech Lead, verify the end-to-end integration between the BasicCalculator frontend implementation and the calculator backend API. Ensure arithmetic operation requests (add, subtract, multiply, divide) are correctly sent to POST /api/calculate/basic, API responses are rendered in the LED display, error states (e.g., division by zero) are surfaced gracefully in the UI, and the mode-switch navigation to ScientificCalculator works correctly. Validate on both desktop and mobile viewports.

Depends on:#16#14
Waiting for dependencies
AI 50%
Human 50%
High Priority
1 day
Tech Lead
#19

Integrate ScientificCalculator Frontend API

Backlog

As a Tech Lead, verify the end-to-end integration between the ScientificCalculator frontend implementation and the calculator backend API. Ensure scientific function requests (sin, cos, tan, log, ln, power, sqrt, pi) are correctly sent to POST /api/calculate/scientific, API responses are rendered in the expression display, domain errors are surfaced gracefully in the UI, and the mode-switch navigation back to BasicCalculator works correctly. Validate on both desktop and mobile viewports.

Depends on:#14#17
Waiting for dependencies
AI 50%
Human 50%
High Priority
1 day
Tech Lead
Landing: View Calculator
Landing: Explore 3D Model
BasicCalculator: Enter Numbers
BasicCalculator: Perform Addition
BasicCalculator: Perform Subtraction
BasicCalculator: Perform Multiplication
BasicCalculator: Perform Division
BasicCalculator: View Result
BasicCalculator: Clear Display
ScientificCalculator: Switch Mode