GateArch is a platform where students can register to study better in preparation for architecture-related exams. People who run the website handcraft posts, and tests to provide these to students to help them before they actually go for a real exam. This means the environment must be as similar as possible to get them familiar with this process.
Software Stack | |
---|---|
Frontend | Bootstrap, Vuejs, ChartJS, jQuery |
Serverside | Laravel |
Database | MySQL |
Versioning/Management | Git and GitHub |
Package Management | Composer |
Server | Nginx |
Hardware Stack | |
---|---|
CPU | 1 vCPU |
RAM | 1 GB DDR4 |
Storage | 40 GB NVME SSD |
OS | Ubuntu 18.04 |
Before I start describing the application and process, Here is the reason why all the above choices in the stack were made.
The entire Application was divided into 4 parts as follows
Section | Function | What was used |
---|---|---|
The Front Page | Landing Page anyone can see went they visit the website, this also houses the blog section which can be updated by the admin of the website | Laravel Server Rendered and bits of javascript for interactivity |
Admin Panel | The admin panel is used by Website administrators and Teachers to manage the website and manage exams etc | Sanjab Component Package for defining the dashboard |
Student Portal | The student portal is where students can log in, read articles, purchase exams, and view exams and their results alongside ranking among the students | Bootstrap, and Laravel to render pages and javascript for bits of interactivity |
Exam Portal | Although it looks like it’s part of the student portal, it’s entirely its own Vuejs application to manage complex states during exams, a SPA-like behavior was needed | Laravel to initial render and hydrating Vuejs App |
📄 The Front Page
🪟 Admin Panel
CrudController
class which lets the Sanjab package know it is primarily a data-oriented screen and will need to have CRUD Forms alongside Datatable to perform bulk operations.CrudController
requires to have a Model Class attached to it to be manipulated. Properties of that model then can be used in widgets like the following, Here start_at
attribute from Model is used for a DateTime WIdget
$this->widgets[] = DateTimeWidget::create('start_at', 'Start Date')
🧑🎓 Student Portal
📝 Exam Portal
exam.main
view alongside passed-in data as JSON on the application’s state.this.exam = {!! json_encode($exam->toArray(), JSON_HEX_TAG) !!}
. It is easy and simple and saves an entire network API call for data that could be pre-filled from the server.git post-receive
hook I can push my PROD branch from local to the VPS server which then would take care of copying code to nginx to clear cache, etc.#!/bin/bash
unset GIT_INDEX_FILE
git --work-tree=/var/www/application.com --git-dir=/home/server/app.git checkout -f
cp ~/.env /var/www/application.com/.env
cd /var/www/application.com
composer install --no-dev
composer dumpautoload -o
php artisan migrate
php artisan view:cache
php artisan route:cache
php artisan config:clear
While creating this entire project Congnimize LLC and I was in a constant feedback loop. And I always helped them to flush ideas into the website they wanted.