A simple CRM application to manage users, built with React, Vite, and TypeScript.
- Create Users: Add new users with their name, email, and location.
- Automatic Avatars: Automatically generates a unique avatar for each user based on their name using the Multiavatar API.
- User Dashboard: Displays all users in a clean, card-based interface.
- Mock API: Uses
json-serverto simulate a RESTful backend for development.
- Frontend: React, TypeScript, Vite
- API Simulation: json-server
- HTTP Client: Axios
- Linting: ESLint
Follow these instructions to get a copy of the project up and running on your local machine for development and testing purposes.
- Clone the repository (or download the source code).
- Navigate to the project directory and install the dependencies:
npm install
This project is configured to connect to a live, read-only API hosted by my-json-server. For a quick start, you can run the application without a local API server.
1. Quick Start (Read-Only Mode)
Install the dependencies and start the development server. The application will fetch data from the live API.
npm install
npm run dev2. Full Development Mode (with Local API)
The live API is read-only. For full functionality (creating, updating, or deleting users), it's recommended to run the local json-server.
First, in the file src/services/userService.ts, temporarily change the API_URL back to http://localhost:3001/users.
Then, run the two servers in separate terminals:
Terminal 1 (Start the local API server):
npm run apiTerminal 2 (Start the development server):
npm run devNote: Remember to change the
API_URLback to themy-json-serverlink before committing changes intended for production.