Skip to content

jehicoob/aicoll-technical-test

Repository files navigation

Companies Management System

aicoll Logo Laravel Logo

Overview

This Laravel-based application provides a comprehensive solution for managing company information. The system offers both a user-friendly web interface and a RESTful API for integrating with other systems.

Deployment

This application is deployed and accessible online:

Web Interface

The live web interface can be accessed at:

URL: https://aicoll-technical-test.jehicoob.dev/

API Documentation

The live API documentation, generated by Swagger/OpenAPI, is available at:

URL: https://aicoll-technical-test.jehicoob.dev/api/documentation

Features

  • Complete company management (creation, viewing, updating, and deletion)
  • Interactive web interface with real-time updates
  • RESTful API with comprehensive documentation
  • Validation to ensure data integrity
  • Status-based company management (active/inactive)
  • Bulk operations for inactive companies

Technology Stack

  • Frontend: Blade templates, Tailwind CSS, JavaScript
  • Backend: Laravel 12
  • Database: MySQL
  • Documentation: Swagger/OpenAPI via L5-Swagger

Getting Started

Prerequisites

  • PHP 8.2 or higher
  • Composer
  • Node.js and NPM
  • MySQL database
  • SQLite (required for running tests)

Installation

  1. Clone the repository:

    git clone https://github.com/jehicoob/aicoll-technical-test.git
    cd aicoll-technical-test
  2. Install PHP dependencies:

    composer install
  3. Install JavaScript dependencies:

    npm install
  4. Create a copy of the environment file:

    cp .env.example .env
  5. Generate application key:

    php artisan key:generate
  6. Configure your database in the .env file:

    DB_CONNECTION=mysql
    DB_HOST=127.0.0.1
    DB_PORT=3306
    DB_DATABASE=your_database
    DB_USERNAME=your_username
    DB_PASSWORD=your_password
    
  7. Run database migrations:

    php artisan migrate --seed
  8. Build assets:

    npm run build
  9. Start the development server:

    php artisan serve

Accessing the System

Web Interface

The web interface is available at:

  • Local development: http://localhost:8000
  • The main screen provides access to all functionality:
    • View all companies
    • Add new companies
    • Edit existing companies
    • Delete inactive companies
    • Change company status

API Documentation

The API documentation is automatically generated using Swagger/OpenAPI and is available at:

  • Local development: http://localhost:8000/api/documentation

API Endpoints

Method Endpoint Description
GET /api/v1/companies List all companies
POST /api/v1/companies Create a new company
GET /api/v1/companies/{nit} Get details of a specific company
PUT /api/v1/companies/{nit} Update a company
DELETE /api/v1/companies/{nit} Delete a company (only if inactive)
DELETE /api/v1/companies/inactive Delete all inactive companies

Testing

Run the automated tests using:

php artisan test

To view a code coverage report, you need to have xDebug installed and enabled. Once it's set up, run:

php artisan test --coverage

💡 Note: Tests use an in-memory SQLite database for fast execution and test isolation. No additional database configuration is needed for testing.

💡 If you don't have xDebug installed, you can follow the official xDebug installation guide for your environment.

This will execute all feature and unit tests to ensure the application is functioning correctly.

License

The Laravel framework is open-sourced software licensed under the MIT license.

About

This repository contains my solution to the technical test from AICOLL, intended for review by their recruitment team.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages