A modern, responsive phone directory application built with React, TypeScript, and TailwindCSS. This application allows users to manage their contacts with features for adding, editing, deleting, searching, and sorting contacts.
- Contact Management: Add, edit, and delete contacts
- Rich Contact Information: Store name, phone number, email, and categorize contacts
- Search Functionality: Quickly find contacts by name, phone number, or email
- Sort Options: Sort contacts by name (A-Z or Z-A) or recently added
- Responsive Design: Works seamlessly across desktop, tablet, and mobile devices
- Dark/Light Mode: Toggle between dark and light themes
- Form Validation: Ensures data integrity with proper validation
- Offline Capability: Stores contacts in local storage for offline access
- Frontend Framework: React with TypeScript
- Routing: Wouter (lightweight routing)
- State Management: React Query and React Hooks
- Styling: TailwindCSS with shadcn/ui components
- Form Handling: React Hook Form with Zod validation
- API Integration: Fetch API with JSONPlaceholder for demo data
- Icons: Remix Icon set
-
Clone the repository:
git clone https://github.com/yourusername/phone-directory-app.git cd phone-directory-app -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
client/
├── src/
│ ├── components/ # UI components
│ ├── hooks/ # Custom React hooks
│ ├── lib/ # Utility functions and API calls
│ ├── pages/ # Page components
│ ├── App.tsx # Main application component
│ └── main.tsx # Application entry point
└── index.html # HTML template
shared/
└── schema.ts # Shared data schemas and types
- Click the "Add Contact" button in the header
- Fill in the contact details: name, phone number, email (optional), and category
- Click "Save" to add the contact to your directory
- Use the search bar in the header to filter contacts by name, phone number, or email
- Results update in real-time as you type
- Click the sort dropdown next to the search bar
- Select your preferred sorting method: A-Z, Z-A, or Recently Added
- Click on a contact card to view options
- Select "Edit" to modify the contact details
- Select "Delete" to remove the contact from your directory
npm run buildnpm testThis project is licensed under the MIT License - see the LICENSE file for details.