A comprehensive sales department management solution built with Node.js, React.js, and PostgreSQL. This system helps track clients, manage deals, and organize client information efficiently.
- Add new clients with detailed information
- Remove existing clients
- View complete client list
- Filter clients by quality and status
- Track client documentation
- High Quality Clients view
- Finalized Deals tracking
- Pending Clients management
- JWT-based authentication
- Secure document upload and management
- Protected API endpoints
- Node.js
- Express.js
- PostgreSQL
- JWT for authentication
- Multer for file uploads
- CORS enabled
- bcrypt for password hashing
- React.js
- Axios for API calls
- React Hooks
- Error Boundary implementation
- Responsive design
- Node.js (v14 or higher)
- PostgreSQL (v12 or higher)
- npm or yarn
- Clone the repository
git clone https://github.com/BenjaminKakai/frontend-client-management-system.git
- Install dependencies
cd server
npm install
- Set up environment variables
Create a
.env
file in the server directory:
PORT=3000
DATABASE_URL_POOLED=your_postgresql_connection_string
JWT_SECRET=your_jwt_secret
- Start the server
npm start
- Navigate to the client directory
cd client
- Install dependencies
npm install
- Start the React application
npm start
The application will run on http://localhost:3001
CREATE TABLE clients (
id SERIAL PRIMARY KEY,
project VARCHAR(255),
bedrooms INTEGER,
budget DECIMAL,
schedule VARCHAR(255),
email VARCHAR(255),
fullname VARCHAR(255),
phone VARCHAR(255),
quality VARCHAR(50),
conversation_status VARCHAR(50)
);
CREATE TABLE payment_details (
id SERIAL PRIMARY KEY,
client_id INTEGER REFERENCES clients(id),
amount_paid DECIMAL,
payment_duration VARCHAR(255),
total_amount DECIMAL,
balance DECIMAL,
payment_date TIMESTAMP
);
CREATE TABLE client_documents (
id SERIAL PRIMARY KEY,
client_id INTEGER REFERENCES clients(id),
document_name VARCHAR(255),
document_path VARCHAR(255)
);
- POST
/login
- User authentication - POST
/refresh-token
- Refresh JWT token
- GET
/clients
- Retrieve all clients - POST
/clients
- Add new client - DELETE
/clients/:id
- Remove client - GET
/clients/finalized
- Get finalized deals - GET
/clients/high-quality
- Get high-quality clients - GET
/clients/pending
- Get pending clients
- POST
/clients/:id/documents
- Upload client documents - GET
/clients/:id/documents
- Retrieve client documents - DELETE
/documents/:id
- Delete document
Benjamin Kakai.
- Email: Benjaminkakaimasai@gmail.com
- Phone: 0757661033
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request