How firaapriliana/porto_fi works
1. This repository is a small single-page frontend app, not a multi-service system. The whole runtime lives in the browser, with a local development/build layer provided by Vite.
2. The application entrypoint is src/main.tsx, which bootstraps the React app and mounts it into index.html. That file is the browser container for the app.
3. src/App.tsx is the top-level UI composition point. In an architecture diagram, this should be the central application node that coordinates all page-level rendering and user interaction.
4. src/types.ts is the shared shape boundary for the app’s data. Its presence suggests the UI exchanges structured objects internally rather than passing loose values around.
5. src/index.css is the global styling layer. It likely defines app-wide layout and visual rules rather than component-scoped styles, so it sits beside the React tree as a cross-cutting presentation concern.
6. src/assets/images holds static image assets used by the UI. These are bundled by Vite at build time and do not represent runtime services.
7. The main external dependency boundary is Google’s Gemini API. The README explicitly requires GEMINI_API_KEY, so the frontend depends on an external AI service for core functionality. The API key is provided through local environment configuration, not hardcoded in source.
8. Configuration and secret management are handled through environment files: .env.example documents the expected variables, while .env.local is used for the actual developer secret. This is the repo’s only clear backend-like boundary.
9. package.json, vite.config.ts, and tsconfig.json define the toolchain rather than business logic. They establish a TypeScript + React + Vite build pipeline, development server, and type-checking behavior.
10. metadata.json and the AI Studio README indicate this project is meant to be run and deployed as an AI Studio app. That suggests the deployment target is a hosted frontend app with external API access, rather than a custom server.
11. The data flow is simple: user interacts with the React UI in App.tsx, the app reads local configuration from environment variables, then sends requests to Gemini and renders the returned results back into the same client UI. There is no repository-local backend or database layer visible in the tree.
12. For an architecture diagram, the main boxes are: Browser/HTML shell, React app (main.tsx + App.tsx), shared types, static assets/styles, environment config, and the external Gemini API. The primary boundary to emphasize is “client-only UI calling a third-party AI service.”
Main entry points: App.tsx App UI · index.html HTML shell · package.json Packages · metadata.json AI Studio metadata
Components 13
Runtime
Client-side app and browser shell
- Browser · Browser runtime that loads the app
index.html - HTML shell · App container and mount point
index.html - App boot · React entrypoint that mounts the app
src/main.tsx - App UI · Top-level UI composition and interaction
src/App.tsx - Shared types · Common data shapes used inside the UI
src/types.ts - Global styles · App-wide presentation and layout rules
src/index.css - Images · Static image assets bundled with the app
src/assets/images
Tooling
Build, type, and deployment configuration
- Packages · Runtime and build dependencies
package.json - Vite config · Dev server and build pipeline settings
vite.config.ts - TypeScript config · Type-checking and compiler settings
tsconfig.json
Integration
External AI and local environment boundary
- Env example · Documented environment variables and secrets
.env.example - Gemini API · Third-party AI service used by the app
- AI Studio metadata · Deployment-oriented app metadata
metadata.json
Connections 14
- Browser → HTML shell: loads · Browser opens the HTML shell
- HTML shell → App boot: mounts · HTML provides the app mount target
- App boot → App UI: renders · Bootstraps the React application
- App UI → Shared types: uses · Shares structured data shapes
- App UI → Global styles: styles · Applies global presentation rules
- App UI → Images: reads · Uses bundled image assets
- App UI → Env example: configures · Depends on documented environment variables
- App UI → Gemini API: calls · Sends user-driven requests to the AI service
- Env example → Gemini API: key for · Documents the API key required for access
- Packages → Vite config: drives · Project dependencies support the Vite toolchain
- Packages → TypeScript config: drives · TypeScript tooling is defined by project setup
- Vite config → HTML shell: serves · Vite builds and serves the browser entry
- AI Studio metadata → Browser: targets · Metadata indicates hosted frontend deployment
- AI Studio metadata → Gemini API: integrates · Deployment expects external AI access