Skip to content

Johann-S/fulll

Repository files navigation

Fulll Technical Test

Technical test submissions for Fulll.

Prerequisites

  • Node.js (LTS or higher)
  • npm

Installation

npm ci

Available Tests

[Algo] FizzBuzz

Classic FizzBuzz implementation with a scalable, rule-based architecture.

Run:

npm run algo

Test:

npm run test:algo

This will run all unit tests across using Node.js's native test runner.

[Back/DDD/CQRS] Vehicle Fleet Parking Management

Vehicle fleet management system using Domain-Driven Design (DDD) and CQRS principles with BDD tests and CLI.

  • 📁 Location: fleet/
  • 📖 Documentation: fleet/README.md
  • 🏗️ Architecture: DDD/CQRS with clean architecture
  • 🧪 Testing: Cucumber.js BDD tests
  • 🖥️ CLI: Commander.js-based command-line interface

CLI Usage:

# Using npm script
npm run fleet -- create <userId>
npm run fleet -- register-vehicle <fleetId> <vehiclePlateNumber>
npm run fleet -- localize-vehicle <fleetId> <vehiclePlateNumber> <lat> <lng> [alt]
npm run fleet -- get-vehicle-location <fleetId> <vehiclePlateNumber>

# Using wrapper script (Unix/Mac/Git Bash)
./fleet.sh create <userId>
./fleet.sh register-vehicle <fleetId> <vehiclePlateNumber>
./fleet.sh localize-vehicle <fleetId> <vehiclePlateNumber> <lat> <lng> [alt]
./fleet.sh get-vehicle-location <fleetId> <vehiclePlateNumber>

Features:

  • Register vehicles into fleets
  • Park vehicles at locations (GPS coordinates)
  • Query vehicle locations
  • PostgreSQL persistence with Drizzle ORM
  • Docker Compose for easy database setup
  • Complete test coverage with Gherkin scenarios
  • Command-line interface for all operations

CI/CD

This project includes a GitHub Actions workflow for continuous integration.

Workflow: .github/workflows/test.yml

The CI pipeline automatically:

  • Triggers on pushes and pull requests to the main branch
  • Sets up Node.js 22.x environment
  • Sets up PostgreSQL 18.1 environment
  • Installs dependencies with npm ci
  • Runs linting with npm run lint
  • Runs database migrations with npm run db:push
  • Runs algo tests with npm run test:algo
  • Runs fleet tests (including persistence) with npm run test:fleet:all
  • Builds the fleet project with npm run build:fleet

This ensures code quality and test coverage are maintained.

Code Quality

This project uses ESLint for static code analysis and code quality enforcement.

Why ESLint was added:

  • Static analysis - Catches bugs, anti-patterns, and code smells before runtime
  • Type safety enforcement - TypeScript-aware rules prevent type-related issues and ensure type safety
  • Code consistency - Enforces consistent coding conventions (naming, imports, formatting) across the codebase
  • Prevents common mistakes - Detects unused variables, incorrect equality operators (== vs ===), and missing error handling
  • Maintainability - Makes code easier to read, review, and maintain for the entire team

Run linting:

npm run lint

The ESLint configuration includes:

  • TypeScript-specific rules for type safety
  • Stylistic rules for consistent code formatting
  • Best practices enforcement (prefer const, no var, etc.)
  • Code quality rules (no unused vars, no debugger, etc.)

Technologies Used

  • TypeScript - Type-safe JavaScript
  • tsx - TypeScript execution engine
  • Node.js - Runtime environment
  • Cucumber.js - BDD testing framework
  • Commander.js - CLI framework
  • Drizzle ORM - TypeScript ORM for PostgreSQL
  • PostgreSQL - Relational database
  • Docker - Containerization
  • GitHub Actions - CI/CD automation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors