Skip to content

glerique/nesCore

Repository files navigation

nesCore

A lightweight, object-oriented PHP micro-framework built from scratch. Designed for learning and applying SOLID principles, design patterns, and clean architecture.

Quick Start

Prerequisites

  • Docker & Docker Compose
  • Git

Setup

  1. Clone the repository:
git clone <repo-url>
cd nesCore
  1. Start the environment:
docker compose up -d --build
  1. Verify installation:
docker compose ps
curl http://localhost:8080/health

Access the application at http://localhost:8080

Database Access

Access the database via Adminer at http://localhost:8081:

  • Server: mariadb
  • Username: nescore
  • Password: nescore
  • Database: nescore

Development

Commands

# Run tests
docker compose exec frankenphp ./vendor/bin/phpunit

# Code analysis
docker compose exec frankenphp ./vendor/bin/phpstan analyse src/

# Format code
docker compose exec frankenphp ./vendor/bin/php-cs-fixer fix .

# Stop environment
docker compose down
docker compose down -v  # Also remove database volume

Environment Configuration

The .env file contains public configuration. Database credentials are in .env.local (not tracked in git for security).

Copy .env.local template if needed:

cp .env.local.example .env.local

Then edit with your local credentials.

Troubleshooting

Container won't start:

docker compose logs frankenphp
docker compose down && docker compose up -d --build

Port already in use: Change ports in docker-compose.yaml or kill the process using the port.

Database connection errors: Verify MariaDB is running and credentials in .env match docker-compose.yaml.

Technology Stack

  • Language: PHP 8.4+
  • Runtime: FrankenPHP
  • Database: MariaDB
  • Web Server: Caddy
  • Testing: PHPUnit
  • Analysis: PHPStan
  • Formatting: PHP-CS-Fixer

Contributing

Please read CONTRIBUTING.md for guidelines.

License

MIT License - See LICENSE file for details

Resources

About

A lightweight, object-oriented PHP micro-framework built from scratch. Designed for learning and applying SOLID principles, design patterns, and clean architecture. Ideal for experimenting with routing, dependency injection, controllers, and more.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors