simo@dev:~/projects$ git clone football-fit
Cloning into 'football-fit'...
fatal: repository 'football-fit' not found: not published yet.
# The repository is being prepared for an open-source release.
simo@dev:~/projects$ cat ~/case-studies/football-fit.md
# Full stack · E-commerce · 2023 · archived
Football Fit
High-school project from 2023. A football apparel shop in plain PHP with an MVC structure, sign-up and login, cookie sessions, SQL injection prevention, an admin sales dashboard and Docker.
- year
- 2023
- type
- Full stack · E-commerce
- status
- Archived · school project
- source
- open source soon
- PHP
- JavaScript
- HTML
- CSS
- Docker
Context
Football Fit is an online shop for football apparel: shirts, boots, goalkeeper gloves and accessories from brands such as Nike, Adidas, Joma and Puma. It was built in high school in 2023, from scratch in PHP and without a framework, to work through every layer of a web shop: routing, data access, sessions, security and administration.
It is an early project. It stays in the archive for the backend fundamentals it covers rather than for its design.
Architecture
The code follows a Model-View-Controller structure. A router receives every request and dispatches it to the right controller, the models own the database access and the views only render. Keeping the layers apart made the security work simpler, because every query that touches user input lives in one place.
Security
- Authentication. Sign-up and login with sessions kept in cookies.
- SQL injection. Queries are written so that user input is never concatenated into SQL.
- Separation of roles. Customers and administrators see different parts of the application.
Shop and back office
Customers browse the catalogue by category and brand and add items to the cart. The admin dashboard shows the sales, so the owner can follow what sells without querying the database.
Running it
The project ships with a Docker setup for local development. The source code will be published as open source; until then, the live demo shows the shop.
# Want something like this built or reviewed?