How lucasdoreac/investindo works
Project Type and Purpose
• This is a mobile full-stack (front-end only) educational finance application built with React Native (Expo) and TypeScript.
• Purpose: present ebook content, interactive glossaries, user profiles, and finance simulators (juros compostos, comparador, escada de vencimentos, montador de carteira).
File Structure
• Top-level configuration:
• app.json (Expo config)
• babel.config.js, tsconfig.json, package.json
• scripts/ (build helpers: LaTeX converter, project reset)
• jest/ & __tests__ (unit tests for calculator logic)
• Key source folders:
• app/ – file-based routing (expo-router) providing screen components under tabs and nested /calculadora/* routes
• assets/ – static content (markdown, JSON chapters, fonts, images, LaTeX)
• components/ – shared UI and theming components (Collapsible, EbookContent, ThemedView/text, ui/IconSymbol, etc.)
README Insights
• Confirms the four main simulator tools and the eBook-based curriculum.
• Lists core technologies: Expo, React Native, TypeScript, expo-router, react-native-chart-kit (charts), mathjs (calculations).
Main Components and Interactions
a. Presentation Layer
• Screens (tabs: Biblioteca, Explore, Glossário, Perfil, Simuladores)
• Calculator pages under /app/calculadora
b. Navigation Layer
• expo-router’s file-based routing tying app/* files to Navigation
c. Business Logic Layer
• Calculator modules (in /app/calculadora) that invoke mathjs
• Profile questionnaire logic (inside Perfil.tsx)
d. Data Layer
• Static content loader: reads markdown/JSON from assets/content (via script-converted JSON)
• Local storage or state management (React Context or local state) for user profile and selections
e. External Libraries & Services
• mathjs for finance formulas
• react-native-chart-kit for graphing results
• Expo APIs (Haptics, assets, font loading)
Architectural Patterns & Design Principles
• File-based routing: Each screen is a file in app/
• Component composition: small, reusable UI primitives in components/ui
• Separation of concerns: UI vs. business logic vs. static data
• Build step for static content: scripts/latex-converter.js transforms LaTeX/Markdown into JSON for faster runtime loading
Additional Details to Capture
• Build-time script that converts LaTeX/Markdown to JSON under “Build Process.”
• Testing harness (__tests__) as a side component validating calculator logic.
• Theming hooks (useThemeColor, useColorScheme) under the presentation layer.