[{"data":1,"prerenderedAt":444},["ShallowReactive",2],{"project-venida":3},{"id":4,"title":5,"body":6,"description":125,"extension":427,"meta":428,"navigation":439,"path":440,"seo":441,"stem":442,"__hash__":443},"content\u002Fprojects\u002Fvenida.md","Venida",{"type":7,"value":8,"toc":412},"minimark",[9,14,84,88,109,112,116,126,130,135,208,218,313,317,355,359,379,383],[10,11,13],"h2",{"id":12},"project-at-a-glance","Project at a Glance",[15,16,17,25,64,74],"ul",{},[18,19,20,24],"li",{},[21,22,23],"strong",{},"Problem:"," Bootstrapping a structured Node.js\u002FTypeScript REST API often requires wiring HTTP routing, lifecycle hooks, request validation, database migrations, background job queues, PM2 configs, and CLI scaffolding from scratch on every new repository.",[18,26,27,30,31,34,35,39,40,43,44,47,48,51,52,55,56,59,60,63],{},[21,28,29],{},"Deliverables:"," An open-source, batteries-included ",[21,32,33],{},"TypeScript + Fastify 4"," backend boilerplate platform (",[36,37,38],"code",{},"seje-digital\u002Fvenida",", ",[36,41,42],{},"2022-2024",") featuring a layered MVC + Service architecture, a custom CLI (",[36,45,46],{},"venida.ts","), a ",[36,49,50],{},".venida"," template code generator (",[36,53,54],{},"Vgen","), ",[21,57,58],{},"Knex.js + MySQL"," migrations\u002Fseeders, a ",[21,61,62],{},"BullMQ + Redis"," queue worker engine, centralized error declarations, and PM2 deployment manifests.",[18,65,66,69,70,73],{},[21,67,68],{},"Core Stack:"," TypeScript, Fastify 4, Node.js, Knex.js, MySQL (",[36,71,72],{},"mysql2","), BullMQ, Redis, PM2.",[18,75,76,79,80,83],{},[21,77,78],{},"Practical Value:"," Led and architected as an open-source backend scaffolding platform under ",[21,81,82],{},"SE-JE Digital"," to provide an opinionated, ready-to-use foundation for TypeScript API development.",[10,85,87],{"id":86},"project-overview","Project Overview",[89,90,91,94,95,97,98,100,101,104,105,108],"p",{},[21,92,93],{},"Venida Platform"," is an open-source backend boilerplate built under ",[21,96,82],{}," (",[36,99,42],{},"), where I led and designed the majority of its core architecture. Inspired by the productivity of batteries-included frameworks while keeping ",[21,102,103],{},"Fastify 4"," and ",[21,106,107],{},"TypeScript"," at the core, Venida packages routing, database migrations, background queues, code generation, and process management into one cohesive repository structure.",[89,110,111],{},"Venida is maintained purely as an open-source boilerplate and architectural reference under SE-JE Digital rather than a commercial client deployment.",[10,113,115],{"id":114},"system-architecture-directory-blueprint","System Architecture & Directory Blueprint",[117,118,123],"pre",{"className":119,"code":121,"language":122},[120],"language-text","venida\u002F\n├── app\u002F\n│   ├── Console\u002F          # Custom CLI commands (Server, Vgen, Knex, Queue, Route)\n│   ├── Http\u002F\n│   │   ├── Controllers\u002F  # Versioned API controllers (e.g. Api\u002FV1\u002FUserController)\n│   │   └── Hooks\u002F        # Fastify lifecycle hooks (OnRequest, PreValidation, OnResponse)\n│   ├── Job\u002F              # Background queue job classes\n│   ├── Models\u002F           # Knex-backed data models\n│   └── Services\u002F         # Domain business logic layer\n├── config\u002F               # Centralized app, database, redis, router, package configs\n├── database\u002F             # Knex migrations & seeders\n├── declaration\u002F          # Centralized error-declaration.json & global types\n├── generators\u002Ftemplates\u002F # .venida scaffolding templates (controller\u002Fmodel\u002Fservice\u002Froute)\n├── routes\u002F               # Modular API route definitions\n├── system\u002F\n│   ├── Core\u002F             # Boot, Core, Datasource, Security, Base classes & Queue Worker\n│   ├── Handler\u002F          # Request, Response, and Route handlers\n│   └── Package\u002F          # Built-in Queue & Validator packages\n├── venida.ts             # CLI entry point\n├── venida.server.yaml    # PM2 HTTP server manifest\n└── venida.queue.yaml     # PM2 background queue worker manifest\n","text",[36,124,121],{"__ignoreMap":125},"",[10,127,129],{"id":128},"core-architectural-decisions","Core Architectural Decisions",[131,132,134],"h3",{"id":133},"_1-fastify-4-core-with-layered-mvc-service-separation","1. Fastify 4 Core with Layered MVC + Service Separation",[15,136,137,170],{},[18,138,139,140,142,143,97,146,39,149,39,152,155,156,39,159,39,162,165,166,169],{},"Wraps ",[21,141,103],{}," inside ",[36,144,145],{},"system\u002FCore\u002F",[36,147,148],{},"Boot.ts",[36,150,151],{},"Core.ts",[36,153,154],{},"Handler\u002FRoute.ts",") with pre-configured ",[36,157,158],{},"@fastify\u002Fhelmet",[36,160,161],{},"@fastify\u002Fcompress",[36,163,164],{},"@fastify\u002Fformbody",", and ",[36,167,168],{},"@fastify\u002Fmultipart"," plugins.",[18,171,172,173,176,177,97,180,39,183,39,186,189,190,176,193,176,196,199,200,203,204,207],{},"Enforces clear boundaries across ",[36,174,175],{},"routes\u002F"," -> ",[36,178,179],{},"Http\u002FHooks",[36,181,182],{},"OnRequest",[36,184,185],{},"PreValidation",[36,187,188],{},"OnResponse",") -> ",[36,191,192],{},"Http\u002FControllers",[36,194,195],{},"Services",[36,197,198],{},"Models",", paired with a custom ",[36,201,202],{},"system\u002FPackage\u002FValidator.ts"," and a centralized ",[36,205,206],{},"declaration\u002Ferror-declaration.json"," registry for consistent API error responses.",[131,209,211,212,214,215,217],{"id":210},"_2-custom-cli-venidats-vgen-template-code-generator","2. Custom CLI (",[36,213,46],{},") & ",[36,216,54],{}," Template Code Generator",[15,219,220],{},[18,221,222,223,226,227],{},"Built a custom console runner (",[36,224,225],{},"app\u002FConsole\u002F",") exposing artisan-style developer commands:\n",[15,228,229,244,267,278],{},[18,230,231,234,235,39,238,39,241],{},[21,232,233],{},"Server & Routing:"," ",[36,236,237],{},"server",[36,239,240],{},"list",[36,242,243],{},"route:list",[18,245,246,234,249,39,252,39,255,39,258,39,261,39,264],{},[21,247,248],{},"Database (Knex.js):",[36,250,251],{},"knex:init",[36,253,254],{},"knex:migrate",[36,256,257],{},"knex:migrate-rollback",[36,259,260],{},"knex:seed",[36,262,263],{},"make:migration",[36,265,266],{},"make:seeder",[18,268,269,234,272,39,275],{},[21,270,271],{},"Queues:",[36,273,274],{},"queue:table",[36,276,277],{},"queue:work",[18,279,280,286,287,39,290,39,293,39,296,39,299,165,302,305,306,308,309,312],{},[21,281,282,283,285],{},"Code Scaffolding (",[36,284,54],{},"):"," Generates new ",[36,288,289],{},"controller",[36,291,292],{},"model",[36,294,295],{},"service",[36,297,298],{},"route",[36,300,301],{},"migration",[36,303,304],{},"seeder"," files automatically from reusable ",[36,307,50],{}," templates under ",[36,310,311],{},"generators\u002Ftemplates\u002F",".",[131,314,316],{"id":315},"_3-background-job-queue-engine-bullmq-redis","3. Background Job Queue Engine (BullMQ + Redis)",[15,318,319,341],{},[18,320,321,322,97,325,39,328,39,331,334,335,104,338,312],{},"Abstracts asynchronous background processing into ",[36,323,324],{},"system\u002FCore\u002FBase\u002FQueue\u002F",[36,326,327],{},"BaseQueueJob.ts",[36,329,330],{},"Processor.ts",[36,332,333],{},"Worker.ts",") backed by ",[21,336,337],{},"BullMQ",[21,339,340],{},"Redis",[18,342,343,344,347,348,104,351,354],{},"Separates HTTP traffic and queue workers into independent ",[21,345,346],{},"PM2"," manifests (",[36,349,350],{},"venida.server.yaml",[36,352,353],{},"venida.queue.yaml",") so long-running jobs do not block API latency.",[131,356,358],{"id":357},"_4-custom-build-watch-tooling","4. Custom Build & Watch Tooling",[15,360,361],{},[18,362,363,364,367,368,371,372,97,375,378],{},"Includes dedicated ",[36,365,366],{},"compiler.ts"," (TypeScript compilation with ",[36,369,370],{},"uglify-js",") and ",[36,373,374],{},"watch.ts",[36,376,377],{},"chokidar"," file watcher) scripts so teams can iterate in debug mode or compile production builds ready for PM2 execution.",[10,380,382],{"id":381},"scope-open-source-context","Scope & Open-Source Context",[15,384,385,391],{},[18,386,387,390],{},[21,388,389],{},"Open-Source Focus:"," Venida was created as a pure open-source boilerplate platform under SE-JE Digital (not deployed as a commercial client system) to explore and standardize batteries-included Fastify + TypeScript backend architecture.",[18,392,393,396,397,39,400,39,403,39,406,39,409,411],{},[21,394,395],{},"Key Engineering Takeaway:"," Designing a framework core from scratch (",[36,398,399],{},"Boot",[36,401,402],{},"Datasource",[36,404,405],{},"Queue",[36,407,408],{},"Validator",[36,410,54],{}," code generator, and custom compiler scripts) deepened practical understanding of how web frameworks orchestrate lifecycle hooks, dependency wiring, and developer ergonomics under the hood.",{"title":125,"searchDepth":413,"depth":413,"links":414},2,[415,416,417,418,426],{"id":12,"depth":413,"text":13},{"id":86,"depth":413,"text":87},{"id":114,"depth":413,"text":115},{"id":128,"depth":413,"text":129,"children":419},[420,422,424,425],{"id":133,"depth":421,"text":134},3,{"id":210,"depth":421,"text":423},"2. Custom CLI (venida.ts) & Vgen Template Code Generator",{"id":315,"depth":421,"text":316},{"id":357,"depth":421,"text":358},{"id":381,"depth":413,"text":382},"md",{"subtitle":429,"slug":430,"client":82,"year":431,"role":432,"category":433,"technologies":434},"TypeScript & Fastify Backend Boilerplate & Code Generator","venida",2022,"Lead Architect & Core Developer","Developer Tools & Infrastructure",[107,435,436,437,438,337,340,346],"Fastify","Node.js","Knex.js","MySQL",true,"\u002Fprojects\u002Fvenida",{"title":5,"description":125},"projects\u002Fvenida","cGej8ZTtx-i6WOH0I1oQ_JiXqbw38VfXOQIl5edY1wY",1796006984016]