This project is a Laravel-based platform on which users can register to attend lessons.
There are many particularities about this project:
- The administrator has several lessons that last a whole "school year" (from September to July).
- Each lesson has dozens of recurrences but happens once per week (unless it's a holiday).
- When creating these occurrences, the platform checks if one occurrence is happening during a holiday, and if so, will skip it until it's a "normal day."
- Customers can subscribe to a specific lesson and will be linked to it through the whole year.
- However, it may happen that for some reason they can't attend their lesson. In that case, they can indicate their absence.
- When they do so, since they have left a spot for the lesson, they may temporarily subscribe to another lesson, on the condition that the ratio of "left/joined" lessons is positive (e.g., they left 6 times and joined 5 lessons, so they can subscribe to one more lesson if there is an open spot).
- Also, it will display in everyone's control panel that a spot is available for the lesson the person left, so people with a positive ratio can temporarily subscribe to it.
Honestly, it was as easy to develop as it was to explain. That's maybe why it took me more than 6 months to develop the whole process alone.
When I first started the project, a new library named InertiaJS was emerging, allowing developers to elegantly join a Laravel backend with a NodeJS front-end:
use Inertia\Inertia;
class EventsController extends Controller
{
public function show(Event $event)
{
return Inertia::render('Event/Show', [
'event' => $event->only(
'id',
'title',
'start_date',
'description'
),
]);
}
}
Here, Laravel will send the Event record with 4 attributes to a VueJS (or React, or Svelte) component named "Show" that's inside an "Event" directory.
I won't go into details about how it works; the documentation is in the link provided.
I have tons of regrets about this project that I certainly will talk about in an article, but as terrible as my experience with this project was, the development itself was a challenge like I've never seen before.
Also, I tagged "DevOps" on it because it was the first time I ever set up a CI/CD system outside of "official" work and a school project.