AJD Economy Stack: A Four-Layer FiveM Resource Pack
A four-resource economy pack for QB-Core FiveM, written for a 480-slot production server. Scavenge feeds crafting, crafting feeds streetselling, streetselling feeds a tycoon meta-system. Built and shipped together, sold individually on Tebex, run in production as the core loop of a roleplay city.
01 The Setup
I run a 480-slot FiveM server called Empire London City. The server has the standard QB-Core stack plus a long list of custom jobs, custom drugs, custom gangs, and custom cars, per the tags in our server.cfg. What it did not have, when I started this work, was a coherent economy.
Scavenge, crafting, and streetselling are three of the most-requested features in any FiveM roleplay server. Every server in the QB-Core ecosystem has them. Most servers buy a scavenge from one seller, a crafting from another, and a streetselling from a third. The three systems have nothing in common. Each one has its own config, its own database tables, its own admin commands, and its own notification format. Players do scavenging with one set of items, crafting with a different set, and streetselling with a third. The server's economy is three parallel silos, none of which talk to each other.
I had a different problem. I wanted an economy that flowed. I wanted a player to be able to scavenge raw materials, craft them into a product, and sell that product to NPCs for cash, all in one continuous loop, on the same items, in the same database, with one set of admin tools. The closed-source paid scripts on the market did not do this, and the open-source community scripts did not do it well.
So I wrote my own. The result is four separate FiveM resources that compose into a single economy stack. The resources are independent (you can run any one of them on its own), but they are designed to compose, and the production server runs all four of them.
02 The Architecture
The stack is a four-layer pipeline. Raw items flow through the layers in order.
Layer 1: ajd-scavenge. The entry point. Players pick up loot from configured locations, with weighted rarity tables, server-side validation, and an LOD system that loads entities only when players are near. Twenty-one files, sixteen of them Lua, including a hot-reload module, an error handler, a particle system, a floating-text renderer, and a full item-lifecycle module. The base resource is open source. A closed-source lite version is sold on Tebex.
Layer 2: ajd-crafting. The transformation. Players take raw materials from scavenge and turn them into products, using configurable recipes, benches, and XP tiers, with anti-dupe server-side validation. Seventeen files. Includes SQL migrations for adding new recipe types without dropping tables, and an NUI frontend for the crafting interface.
Layer 3: ajd-streetselling. The output. Players take the products from crafting and sell them to NPCs for cash, with a smart-NPC system that remembers past interactions and builds loyalty per player, a territory-control system tied to gangs, a heat system that escalates police attention as activity rises, a market-pricing system with supply and demand multipliers, and a full police-integration system. Seven files. The open-source base is lean. The Tebex lite version is a smaller entry point for servers that want the feature without the full system.
Layer 4: ajd-tycoon. The meta-system. Players can register businesses that bind any combination of the three lower-layer resources under a single ownership, with upgrades (efficiency, storage, security, marketing, logistics), financial tracking (balance, revenue, expenses, withdrawals), and daily analytics. Twenty-eight files, twenty-one of them Lua, plus its own NUI frontend (HTML, CSS, JavaScript) and a six-table MySQL schema.
The integration table in the tycoon schema is the architectural keystone. It is a single table with an ENUM column that has four values: 'scavenge_zone', 'crafting_bench', 'streetselling_zone', 'bunker'. The tycoon system does not care which of the lower-layer resources are loaded. It just records that a tycoon owns a resource of a particular type, identified by ID, and the lower-layer resources do their own thing. The schema is the contract.
03 The Wider 2025 Work
The four-resource stack is the spine. Around it, during 2025, I built a wider set of systems for the same server, all in the same coding style, all with the same design philosophy of independent resources that compose.
ajd-fishing is a parallel economy track. It does not declare ajd-tycoon as a dependency and ajd-tycoon does not declare it. But it is part of the same 2025 design work: a full fishing system with shop, leaderboards, XP, weather effects, fish market, daily rewards, rare fish, and timed tournaments. Twenty-three files, including its own NUI and a SQL schema for player_fishing_stats. It is open source on the server. It sells as a standalone product on Tebex.
ajd-bunker sits inside the tycoon dependency graph (it is one of the four ENUM values in the integration table). It is an admin bunker and basement management system that uses existing GTA V IPLs (Interior Prop Lists), with persistent storage, automatic IPL loading and unloading, and a teleportation system for entering and exiting. Ten files, four of them SQL. It is the storage-and-operations layer of the tycoon, the place where the raw material becomes inventory.
ajd-basebuilding is the player-facing persistent-build system, adjacent to the economy stack. Players build survival bases from GTA V props, and the bases persist across server restarts. Twelve files, including its own NUI, a permissions system (view / build / manage levels), a base-sharing system, and a distance-based prop loading and unloading system for performance. It is the player-facing answer to the question, "I have a tycoon, where do I live?"
ajd-notify is a 21K, four-file unified notification library. It is the layer that absorbs legacy notification events from the older AJD resources (each of which used to fire its own ajd-resource:client:notify event) and presents them through a single consistent UI. It is the smallest resource in the stack and the most architecturally important for long-term maintenance.
Together, the seven resources (the four-layer economy stack plus fishing, bunker, and basebuilding) form the production FiveM code that runs Empire London City. They were all written in 2025 to 2026, all use the same coding conventions, all share the same notification abstraction, and all sell individually on Tebex while composing into a coherent whole on the server.
04 The Production Server
The server is called Empire London City. It is a 480-slot QB-Core roleplay server with custom jobs, custom drugs, custom gangs, and custom cars. It runs the full economy stack in production. Players scavenge, craft, sell, and run businesses. The tycoon system tracks daily revenue across all four layers.
What I will not do here is quote specific revenue numbers or player counts, because they vary by week and because the server is a business, not a portfolio. What I will say is that the systems are in production, that they run, that players use them, and that the failure modes I worried about during development (tycoon-state corruption, scavenge hot-reload crashes, crafting recipe conflicts, streetselling NPC memory leaking across sessions) all have server-side validation that prevents them.
The production deployment is the thing that taught me the most. It is one thing to ship a resource that runs in a clean dev environment. It is another to ship a resource that runs across a 480-slot server for a year, with players doing every weird thing players can think of, and a database that grows and grows. Most of the server-side validation in these resources was added in response to specific production incidents, not to a spec. I will not list those incidents, because production debugging is not a portfolio piece, but they are in the commit history.
05 What I Sold, What I Kept Open
The base versions of all four economy resources, plus ajd-fishing and ajd-basebuilding, are open source. The code is on the production server and runs there every day. Other developers can read it, learn from it, and self-host.
I also sell lite versions of three of the resources on Tebex: ajd-scavenge-lite, ajd-crafting-lite, and ajd-streetselling-lite. The lite versions are smaller, focused entry points for servers that want the feature without the full system. They are closed source. The full versions are free. The two are different products, and I will not conflate them.
The Tebex sales pages for the three paid products are also in the resource folder, as ajd-crafting-promo, ajd-scavenge-promo, and ajd-streetselling-promo. Those are marketing copy, not code. They are part of the same product surface and I include them here only to be complete about what exists.
ajd-tycoon itself does not have a lite version. It is the meta-system, and the meta-system only makes sense if you have at least scavenge and crafting loaded. So you either run the full open-source stack, or you do not run tycoon at all. That is a deliberate decision, not an oversight.
06 The Honest Limits
This case study is about what I built and what it does in production. It is not a sales pitch for the Tebex products. The full open-source versions are free, and if you want the lite versions you can find them on Tebex under the AJTheDev store. I am not going to list the prices here.
The codebase is large and the case study is necessarily selective. I have not described the security validation in detail, the anti-cheat patterns, the rate limiting, the hot-reload behaviour, or any of the other production engineering that makes the difference between a working resource and a server-stability liability. If you are evaluating this work for a serious engagement, the code is the primary source. The README in each resource folder is the secondary source. This case study is the third source, and the most accessible.
I am still actively iterating on these systems. The schema changes. The feature set changes. The cases for what the integration table can express grow as I add new resource types. The patterns in this case study reflect the state of the code as of 2026, not a finished product.
07 What I Learned
The single most useful architectural decision was the ENUM-typed integration table. A single foreign key with a constrained set of values is enough to make a meta-system work, as long as the lower-layer resources know how to look themselves up by their own ID. Trying to make the integration table "smart" by storing generic data per type would have been a mistake. Trying to make the lower-layer resources talk to each other directly would have been worse. The meta-system owns the relationship; the lower-layer resources own the data.
The second most useful decision was treating each layer as independently shippable. ajd-scavenge works on a server that has none of the other resources loaded. ajd-crafting works on a server that has only ajd-scavenge. ajd-streetselling works on a server that has only ajd-crafting. ajd-tycoon works on a server that has any combination of the three. That is what makes the Tebex lite strategy viable: you can buy just the piece you need, and the system is the same.
The third most useful decision was using the same notification event contract across all the resources. When I refactored to use a single ajd-notify abstraction, the older legacy events were absorbed automatically. If I had not done that refactor, every resource would have its own notification format and the player experience would be a mess.