Vitayou Project Overview
Vitayou is an API-centric project with distributed services. Its main modules are consists of:
- API & Dashboard Panel
- CMS
- PDF Parser
- Address Query Service (subject to change)
- Client (Nuxt app and mobile app)
- Bug tracker
API & Dashboard Panel
The API is the main module that handles authentication, customer related data processing (accounts, carts, CDP data...), surveys, product management, order management, accounting software integration and shipping provider integration.
It also serves as a bridge between the PDF parser module which is built with Node.js.
Tech Stack
- PHP 8.4
- Laravel 12
- MariaDB
- Docker
- Redis
The project uses the default Laravel boilerplate MVC architecture with the addition of service + repository pattern.
| Service | Environment | URL |
|---|---|---|
| API | Staging | https://api.dev.vitayou.co |
| API | Production | https://api.vitayou.co |
| Dashboard | Staging | https://dashboard.dev.vitayou.co |
| Dashboard | Production | https://dashboard.vitayou.co |
CMS
The clients use the CMS as the single source of truth when it comes to rendering the UI with localized dynamic content. From product data to static pages structure and blog post, the CMS helps with the easy integration of Nuxt.js client and it also is in communication with API in order synchronize relevant production information.
Tech Stack
- Directus 12
- Docker
| Service | Environment | URL |
|---|---|---|
| CMS | Staging | https://cms.dev.vitayou.co |
| CMS | Production | https://cms.vitayou.co |
PDF Parser
The PDF parser is built with Node.js and uses simple methods to parse blood test PDF documents into usable JSON outputs.
The method can be summarized to following steps:
- Convert PDF into HTML with pdf2htmlEx
- Parse each line of test results using simple methods using the Node.js DOM features (i.e. group PDF text boxes within same vertical distance to top)
- Accumulate the data into meaningful JSON objects with the help of preset test result glossary (units, test types, keywords, etc)
- Return the output as the response
The project runs as a separate Docker container and is accessed by the API via Docker subnet for fast response times
Address Query Service
The API and clients have a dynamic shipping and billing address interface. The inputs within each address form is generated dynamically depending on the chosen country. Since each country has a different set of rules and address properties, the address schemas, validations and rules are dynamically generated by the address repository within API.
Given that, the autocomplete feature for Turkish addresses are queried from this mini service which is a fork of https://turkiyeapi.dev/ which helps us offer filled dropdowns depending on the previous choices of the user.
Client
Currently we have only one client, a Nuxt.js v3 project. It communicates with API and CMS throughout the lifecycle of each session. Most of the UI data originates from CMS however carts, authentication (Sanctum), surveys and any other customer related resource originate from API.
| Service | Environment | URL |
|---|---|---|
| Website | Staging | https://app.dev.vitayou.co |
| Website | Production | https://vitayou.co |
Bug Tracker
We are using a Sentry compatible lightweight docker service called Bugsink to catch exceptions, errors and any unhandled situations within both the API and Nuxt.js project.
The instance is currently setup on dev server.
| Service | Environment | URL |
|---|---|---|
| Bug Tracker | Production | https://bug.vitayou.co |
