PHPackages                             pnbarbeito/ondine-skeleton - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. pnbarbeito/ondine-skeleton

ActiveProject[Framework](/categories/framework)

pnbarbeito/ondine-skeleton
==========================

Skeleton project to start an Ondine-based application

v1.0.0(7mo ago)015MITPHP

Since Sep 25Pushed 7mo agoCompare

[ Source](https://github.com/pnbarbeito/Ondine-skeleton)[ Packagist](https://packagist.org/packages/pnbarbeito/ondine-skeleton)[ RSS](/packages/pnbarbeito-ondine-skeleton/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Ondine Skeleton
===============

[](#ondine-skeleton)

[![PHP Version](https://camo.githubusercontent.com/45d36955804bf3f4f17097b05a7f41a28e578dc24e0d3ad0d21ae9d9762f44c6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312b2d626c75652e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](LICENSE)

A minimal application skeleton for quickly bootstrapping new projects with the Ondine PHP microframework. Get a fully functional REST API with authentication up and running in minutes.

✨ Features
----------

[](#-features)

- 🚀 **Rapid Setup**: Working API in under 5 minutes
- 🔐 **JWT Authentication**: Secure login with refresh tokens
- 👥 **User Management**: Full CRUD for users and profiles
- 📚 **Interactive Docs**: Built-in Swagger UI at `/docs`
- 🗄️ **Database Ready**: SQLite (dev) or MariaDB/MySQL (prod)
- 🧩 **Extensible**: Easy to add controllers, routes, and middleware

📦 Installation
--------------

[](#-installation)

### Via Composer Create-Project

[](#via-composer-create-project)

```
# Recommended: Install stable version (when available)
composer create-project pnbarbeito/ondine-skeleton my-app

# Alternative: Install development version
composer create-project pnbarbeito/ondine-skeleton my-app dev-main

# Or with dev stability
composer create-project pnbarbeito/ondine-skeleton my-app --stability dev
```

🚀 Quick Start
-------------

[](#-quick-start)

1. **Install dependencies:**

    ```
    composer install
    ```
2. **Configure environment:**

    ```
    cp config/.env.example config/.env
    # Edit config/.env with your settings
    ```
3. **Run migrations:**

    ```
    php scripts/migrate.php
    ```
4. **Start the server:**

    ```
    php -S 0.0.0.0:8000 -t public
    ```
5. **Test it:**

    - Frontend:
    - API Docs:

� Production Deployment
-----------------------

[](#-production-deployment)

The skeleton includes a complete Docker-based production setup in the `docker/` folder:

- **`docker-compose.prod.yml`**: Production-ready container orchestration with Nginx, PHP-FPM, and MariaDB
- **`Dockerfile`**: Multi-stage build for optimized PHP container
- **`nginx.conf`**: Nginx configuration with FastCGI proxy and static file serving
- **Environment setup**: Pre-configured for production with proper security settings

### Quick Production Setup

[](#quick-production-setup)

1. **Navigate to docker folder:**

    ```
    cd docker
    ```
2. **Configure environment:**

    ```
    cp .env.example .env
    # Edit .env with your production settings (database, secrets, etc.)
    ```
3. **Deploy:**

    ```
    docker compose -f docker-compose.prod.yml up -d
    ```
4. **Run migrations:**

    ```
    docker compose -f docker-compose.prod.yml exec app php scripts/migrate.php
    ```

The application will be available at `http://localhost` (or your configured domain).

> 📖 **Full documentation**: See `docker/README.md` and `docker/README.es.md` for detailed production deployment guides in English and Spanish.

�📋 API Endpoints
----------------

[](#-api-endpoints)

The skeleton provides ready-to-use REST endpoints under `/api`:

### Authentication

[](#authentication)

- `POST /api/login` - User login
- `POST /api/refresh` - Refresh JWT token
- `POST /api/logout` - Logout user
- `GET /api/me` - Get current user info

### Users (CRUD)

[](#users-crud)

- `GET /api/users` - List users
- `GET /api/users/{id}` - Get user by ID
- `POST /api/users` - Create user
- `PUT /api/users/{id}` - Update user
- `DELETE /api/users/{id}` - Delete user

### Profiles

[](#profiles)

- `GET /api/profiles` - List profiles
- `GET /api/profiles/{id}` - Get profile by ID

### Example Usage

[](#example-usage)

Login and get a token:

```
curl -X POST http://localhost:8000/api/login \
  -H "Content-Type: application/json" \
  -d '{"username":"sysadmin","password":"SecureAdmin2025"}'
```

Use the token for authenticated requests:

```
curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  http://localhost:8000/api/me
```

📁 Project Structure
-------------------

[](#-project-structure)

```
my-app/
├── config/          # Environment configuration (.env)
├── data/            # Database files (SQLite)
├── migrations/      # Database migrations
├── public/          # Web root (index.php, docs/)
├── scripts/         # Utility scripts (migrate.php)
├── src/             # Application code
│   ├── Controllers/ # API controllers
│   ├── Middleware/  # Custom middleware
│   └── ...          # Models, services, etc.
├── tests/           # PHPUnit tests
└── vendor/          # Composer dependencies

```

⚙️ Configuration
----------------

[](#️-configuration)

### Environment Variables

[](#environment-variables)

Copy `config/.env.example` to `config/.env` and configure:

```
# Database
DB_DRIVER=sqlite  # or mariadb
DB_SQLITE_PATH=./data/database.sqlite

# JWT Secret (CHANGE IN PRODUCTION!)
JWT_SECRET=your_secure_jwt_secret_here

# Admin User Seeds
SEED_ADMIN_USERNAME=sysadmin
SEED_ADMIN_PASSWORD=SecureAdmin2025
```

### Database

[](#database)

**SQLite (Default - Development):**

- File: `data/database.sqlite`
- No additional setup required

**MariaDB/MySQL (Production):**

```
DB_DRIVER=mariadb
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_DATABASE=ondine
MYSQL_USER=your_user
MYSQL_PASSWORD=your_password
```

🛠️ Development
--------------

[](#️-development)

### Running Tests

[](#running-tests)

```
composer install --dev  # Install development dependencies
composer test
# or
./vendor/bin/phpunit --colors=always
```

### Test Coverage

[](#test-coverage)

```
composer test-coverage
# View coverage report in coverage/index.html
```

### Migrations

[](#migrations)

```
# Run all migrations
php scripts/migrate.php migrate

# Rollback last migration
php scripts/migrate.php rollback 1

# Custom seed values
env SEED_ADMIN_USERNAME=custom php scripts/migrate.php migrate
```

### Adding New Features

[](#adding-new-features)

1. **Controllers**: Add to `src/Controllers/`
2. **Routes**: Register in `public/index.php`
3. **Middleware**: Add to `src/Middleware/`
4. **Migrations**: Create in `migrations/`

🔧 API Documentation
-------------------

[](#-api-documentation)

Interactive Swagger UI available at `http://localhost:8000/docs`

- Automatically captures JWT tokens from login responses
- Test all endpoints directly from the browser
- View request/response schemas

🐛 Troubleshooting
-----------------

[](#-troubleshooting)

### Permission Errors in Docker

[](#permission-errors-in-docker)

Use named volumes for persistent storage or run migrations locally.

### Database Connection Issues

[](#database-connection-issues)

- Verify `.env` configuration
- Ensure database server is running
- Check user permissions

### Port Conflicts

[](#port-conflicts)

Change the port in the PHP server command:

```
php -S 0.0.0.0:8081 -t public
```

🤝 Contributing
--------------

[](#-contributing)

1. Fork the repository
2. Create a feature branch
3. Add tests for new functionality
4. Ensure all tests pass
5. Submit a pull request

📄 License
---------

[](#-license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

🔗 Links
-------

[](#-links)

- [Ondine Framework](https://github.com/pnbarbeito/ondine) - Main framework repository
- [Packagist](https://packagist.org/packages/pnbarbeito/ondine-skeleton) - Composer package
- [Documentation](https://github.com/pnbarbeito/ondine/wiki) - Full documentation

---

Built with ❤️ using the [Ondine](https://github.com/pnbarbeito/ondine) microframework.

Ondine-skeleton
===============

[](#ondine-skeleton-1)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance63

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

227d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87bac0fd893a9efbc52f350db5b984e1976eff1f413fc01e918075dc550ddf56?d=identicon)[pbarbeito](/maintainers/pbarbeito)

---

Top Contributors

[![pnbarbeito](https://avatars.githubusercontent.com/u/5049840?v=4)](https://github.com/pnbarbeito "pnbarbeito (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pnbarbeito-ondine-skeleton/health.svg)

```
[![Health](https://phpackages.com/badges/pnbarbeito-ondine-skeleton/health.svg)](https://phpackages.com/packages/pnbarbeito-ondine-skeleton)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M191](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M256](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M592](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
