How rodrigoaraujo7/codeleap-engineering-test works
Project type and purpose
• This is a single-page frontend application (React + TypeScript) used as an engineering test.
• It implements user sign-in and a “posts” feed, powered by Axios calls to an external REST API.
File structure
• Top-level:
• index.html, public/ — static entry point
• src/ — application source
• src/pages/ — page-level views (Home, SignIn)
• src/layout/ — layout components (Main)
• src/components/ — reusable UI elements + skeletons
• src/store/ — React Context providers (AuthProvider, PostProvider)
• src/routes.tsx — routing configuration
• vite.config.ts, tsconfig*.json — build config
Insights from README
• Tech stack: React, TS, Tailwind, Axios, React Router Dom, Framer Motion
• No backend in repo → app relies on external HTTP API
a. Main components to include
• Browser / Client
• React Application
– Entry point (main.tsx → ReactDOM.render)
– Router layer (routes.tsx)
– Layout (Main)
– Pages (SignIn, Home)
– UI Components (Button, Card, Input, Spinner, etc.)
– Skeleton Components for loading states
• State Management
– AuthProvider (handles user identity, tokens)
– PostProvider (fetches/posts data, caching)
• HTTP Client
– Axios instance (configured in store or dedicated api file)
• External Service
– REST API endpoints for authentication and posts
b. Relationships and interactions
1. Browser loads index.html → mounts React App
2. React Router directs to SignIn or Home pages
3. Pages render UI components and consume Context hooks
4. On user action (login, fetch posts, create/edit/delete) → Context dispatches Axios request → External API
5. API response flows back to Context → updates state → UI re-renders
c. Architectural patterns & design principles
• Component-based UI (separation of concerns by component)
• Unidirectional data flow via React Context
• Presentation vs. Container (Pages/Providers handle data; components handle rendering)
• Loading skeletons to improve perceived performance
d. Key technologies & libraries
• React + TypeScript (component model, type safety)
• Tailwind CSS (utility-first styling)
• Axios (HTTP client)
• React Router Dom (client-side routing)
• Framer Motion (animation on components)
• Vite (development/build tooling)