Features Implemented
- CRUD Operations:
- Companies: Create, Read, Update, Delete
- Founders:
- Each company has a founder (One-to-One relationship).
- Founders can be added or updated along with the company they represent.
- Employees:
- Each company has multiple employees (One-to-Many relationship).
- Employees have the following attributes:
- Name: The employee's first and last name.
- Position: The job title of the employee.
- Company: Each employee is associated with a specific company.
- Technologies: A list of technologies that the employee is skilled in.
- Technologies:
- Technologies are not fetched from an external API; instead, they are sourced from a local JSON file.
- This JSON file contains an array of technology objects, each having properties such as:
- Id: id of each technology
- Name: The name of the technology (e.g., React, Node.js).
- Data Relationships:
- One-to-One: Each company has one founder.
- One-to-Many: Each company has multiple employees. Each employee has a list of technologies they are skilled in.
- Pagination and Filtering:
- Company and employee lists can be filtered and paginated for large datasets.
- Employee and company filtering is based on relevant fields.
- Pagination supports handling a large number of records efficiently.
- Virtualized Rendering
- Founders and technologies lists are rendered using
react-virtualized
to handle thousands of records (e.g., a list of 60,000 technologies).
- Founders and technologies lists are rendered using
- External API:
- Data (like Company's, Employees, Founders ) are fetched from an external API and stored in the database for further operations.
- Frontend:
- Built using React for a smooth and interactive UI experience.
- Efficiently renders large datasets with
react-virtualized
to ensure performance scalability.
- Backend:
- The backend is built with MongoDB to store all company, founder, employee, and technology data.
- Mongoose is used for schema definition and data management.
- Includes all necessary API endpoints for interacting with the data (CRUD).
How to Start in Dev mode:
- Clone repository:
git clone https://github.com/your-repository/skill-test cd skill-test
- Download npm packages:
npm i
- Set Up Environment Variables: Create a .env file in the root directory and add the following variables:
NEXT_PUBLIC_API_URL=http://localhost:3000 MONGODB_URI=mongodb://localhost:27017/your-database-name // or ask me for database connection string
- Run the Development Server:
npm run dev
Open your browser and navigate to http://localhost:3000.