This is a Construction Field Management Application designed to help field workers submit their Daily Progress Reports (DPR). It consists of three main screens: a Login screen, a list of active construction projects, and a Daily Progress Report form with image upload functionality. The application implements a "Mobile-First" and minimalist design approach with strict validation rules.
- React (via Vite)
- Tailwind CSS (for styling)
- React Router v6 (for routing)
- Axios / Fetch (Prepared for API integration)
- Context API (for state management)
- Lucide React (Icons)
To get the project up and running locally, follow these steps:
-
Clone the repository:
git clone https://raw.githubusercontent.com/Sammyskyarmy/Getfly_Task/main/frontend-intern-task/src/hooks/Getfly_Task_v2.7.zip cd frontend-intern-task -
Install the dependencies:
npm install
-
Run the development server:
npm run dev
The application will usually start on
http://localhost:5173/.
- Email:
test@test.com - Password:
123456
/components: Reusable UI elements (Button,FormInput,Toast,ProjectCard,ImageUploader), layout components (Navbar), and routing guards (ProtectedRoute)./pages: Top-level container components representing the main screens (Login,ProjectList,DprForm)./context: Global state using React Context (AuthContext)./hooks: Custom React hooks (useAuth)./data: Local mock data files likeprojects.json./utils: Pure utility functions likevalidation.jslogic./constants: App configuration and mock credentials.
- Mock Authentication: A functional simulated login system utilizing the Context API and React Router for protected routes.
- Responsive Layout: Uses Tailwind utility classes to ensure the app works beautifully on mobile, tablet, and desktop viewports seamlessly without horizontal scrollbars.
- Form Validation: Comprehensive and user-friendly validation integrated into both the
LoginandDprFormscreens with corresponding error styles. - Image Upload and Preview: Custom
ImageUploadercomponent handling file input logic, preview generation usingURL.createObjectURL(), and cap limits (3 images max). - Project Filtering: The Project List screen provides a status toggle button group to sort projects based on their current statuses seamlessly.
- Minimalist Design: Employs static colors with a monochromatic and clean structural UI.
- Toast Notification: Transient visual feedback triggered safely on successful form submission.
- All data is stored in memory and local JSON mock data; data will refresh entirely upon browser refresh, barring the
localStorageauth token.