WebNest
Team/Shahnawaz Sazid/DATADROPX-FRONTEND

Repository

DATADROPX-FRONTEND

This project is a clean Next.js + TypeScript frontend for managing employees. It is designed to work with the DataDropX Backend API and provides a responsive UI for listing, searching, creating, updating, and deleting employees.

View on GitHub ↗
TypeScript0 stars0 forksdatadropx-frontend.vercel.app/

README

DataDropX Frontend - Mini Employee Directory UI

This project is a clean Next.js + TypeScript frontend for managing employees. It is designed to work with the DataDropX Backend API and provides a responsive UI for listing, searching, creating, updating, and deleting employees.

Tech Stack

  • Next.js (App Router)
  • React
  • TypeScript
  • Tailwind CSS
  • shadcn/ui components
  • Sonner (toast notifications)
  • Zod

Project Features

  • Employee table view with clean UI
  • Debounced employee search
  • Pagination support
  • Add employee modal form
  • Update employee modal form
  • Delete confirmation dialog
  • Client-side form validation and friendly error display
  • Loading skeletons and request error states

Backend Dependency

This frontend depends on the DataDropX Backend API.

Make sure backend is running first:

Frontend uses this environment variable to connect:

Environment Variables

Create a .env file in the project root with:

Installation Steps

  1. Clone the repository
  • git clone <your-repository-url>
  1. Go to the project folder
  • cd DATADROPX-FRONTEND/datadropx-frontend
  1. Check Node.js version (recommended Node 18+)
  • node -v
  1. Install dependencies
  • npm install
  1. Create .env file in the root directory
  • Add NEXT_PUBLIC_BASE_API_URL value
  1. Start the development server
  • npm run dev
  1. Build and run production mode (optional)
  • npm run build
  • npm start

Run Locally

  1. Install dependencies
  • npm install
  1. Make sure backend server is running on port 5000
  • Backend env should include PORT=5000
  1. Set frontend environment variable
  1. Run development server
  • npm run dev
  1. Open in browser

Available Scripts

  • npm run dev: Starts Next.js in development mode
  • npm run build: Builds production bundle
  • npm run start: Runs production server
  • npm run lint: Runs ESLint checks

API Integration Overview

Frontend consumes these backend endpoints:

  • GET /api/employees
  • POST /api/employees
  • PUT /api/employees/:id
  • DELETE /api/employees/:id

Supported list query params used by frontend:

  • searchTerm
  • page
  • limit

Folder Structure (High Level)

  • src/app: App Router pages and global layout
  • src/components/forms: Employee add/update forms
  • src/components/modules: Table, dialogs, filters, pagination
  • src/hooks: Custom hooks (including debounce)
  • src/services: API service layer
  • src/lib: Fetch wrapper and utility helpers
  • src/types: Shared TypeScript interfaces
  • src/zod: Validation schemas

Notes

  • Start backend before frontend to avoid API connection errors.
  • If you change backend host/port, update NEXT_PUBLIC_BASE_API_URL accordingly.
← Back to profile