PokéShop is a zero-dependency online shop built with my own Laravel-like framework. This project was made during the NIX Solutions education program.
- Lightweight and well-documented. The size of PokéShop is only 115KB without images. Every method is well-documented so you always will know their function.
- Fast and smart routing. The router uses regular expressions to determine the correct controller. Simply add one line of code in
routes/web.php
and your new page will work just fine! Pass any parameter inside curly brackets and access it in your controller. - Built-in API support. Any request on the path, defined in
routes/api.php
will work just fine!GET
,POST
,PUT
,PATCH
, andDELETE
methods are supported. Pass any parameter or/and body and access them in your controller! The API is isolated from the web application. - Built-in DotEnv.
- Easy-to-manipulate database with PDO.
- A lot of helpers such as:
- Session helper for PHP sessions.
- Data validation for both web and API.
- API authorization and Bearer token generator.
- Simple API response.
- Custom error and exception handler with logging.
- Models using Active Record template.
- Testing with Codeception.
- PHP 8.x
- MySQL 6.x / MariaDB 10.x
- Composer 2.x
Windows installation:
- Download and install the latest version of XAMPP. It will install both PHP and MariaDB. Whenever you want to use your database, open XAMPP and start the MySQL process. To access PhpMyAdmin, start both Apache and MySQL processes, click on the Admin button next to MySQL
- Download and install the latest version of Composer. A PHP dependency manager.
macOS installation:
You can easily install those via Homebrew:
brew install php mysql composer
Application provides scripts for an easy contol of the application, type composer run -l
to see all of them.
- Serve the application with
composer run serve
- Build zero-dependency app with
composer run build
- Run all test or specific one with
composer run test
- Other test scripts.
Action | Request | Method | Requirements |
---|---|---|---|
Register | /auth/signup |
POST |
Data |
Sign in | /auth/signin |
POST |
Data |
Sign out | /auth/signout |
POST |
Bearer token |
Action | Request | Method | Requirements |
---|---|---|---|
Get all users | /users |
GET |
|
Get user | /users/{id} |
GET |
user ID |
Actionn | Request | Method | Requirements |
---|---|---|---|
Get all products | /catalog |
GET |
|
Get product | /catalog/{id} |
GET |
product ID |
Action | Request | Method | Requirements |
---|---|---|---|
Get user orders | /orders |
GET |
Bearer token |
Get specific order | /orders/{id} |
GET |
Bearer token, order ID |
Create order | /orders |
POST |
Bearer token, data |
Delete order | /orders/{id} |
DELETE |
Bearer token, order ID |
Don't forget to check out PokéShop with Vue.js
Also check out my other projects and visit my website!