How imadbils/justintime- works
Project type and purpose
• JustInTime is a lightweight full-stack personal project management app.
• It uses Bun as both the web server (static file hosting) and API router (backend) and React + Tailwind CSS (frontend).
• Data persistence is handled via a local JSON file (data/projects.json).
File structure
• Top level:
• build.ts, bunfig.toml, bun.lock, package.json – build and runtime config for Bun
• data/projects.json – the sole “database”
• src/ – frontend and API code in TypeScript/TSX
• In src/:
• frontend.tsx, index.html, index.css, index.tsx, App.tsx, APITester.tsx
– React entry points, components, styling, and a small API tester UI
• There is no separate “backend” folder; Bun’s routing code likely lives alongside the React files or is bootstrapped via build.ts.
README for additional insights
• Confirms stack: Bun (server+API), React (UI), Tailwind (styles), local JSON storage
• Features: CRUD operations against projects.json via a simple REST-style API
a. Main components
• Client (Browser) running the React + Tailwind UI
• Bun server (HTTP static file server + REST API router)
• Data store (local JSON file)
b. Relationships / data flows
1. Browser requests index.html and JS/CSS assets → Bun server serves static files.
2. React app bootstraps in the browser.
3. User actions in the UI → HTTP fetch calls to Bun server API endpoints (/projects, /projects/:id).
4. Bun server reads/writes data/projects.json → performs CRUD operations.
5. Server returns JSON responses → React updates UI.
c. Architectural patterns and design principles
• Layered separation: Presentation (React) ↔ API layer (Bun routes) ↔ Storage (JSON file).
• Single‐page application (SPA) on the frontend.
• Minimal “database” abstraction: Direct file I/O on JSON.
d. Key technologies/frameworks
• Bun: fast JavaScript runtime, bundler, server, and router
• TypeScript everywhere for type safety
• React for UI components (App.tsx, APITester.tsx)
• Tailwind CSS for styling
• JSON file as lightweight persistence
• Browser → Bun server (GET/POST/PUT/DELETE)
• Bun server → JSON file (read/write)
• Bun server → Browser (serve static files, return JSON)
• Blue for client-side (React + Tailwind)
• Green for server-side (Bun)
• Orange for storage (JSON file)