Adrian R.L.M
All projects

For anyone who wants to sell digital products online.

FiveM Store

Premium marketplace for the FiveM community: buy and download scripts, assets, and resources for your server.

Timeline3 Weeks
RoleFull Stack Developer
Tech StackNext.js · React · PostgreSQL
fivem-store-theta.vercel.app/es
01 of 19

The Problem

The FiveM community lacks a centralized, trustworthy platform for acquiring premium server resources. Content creators have no professional channel to monetize their work, and server administrators must search scattered forums, risking malicious or outdated downloads.

  • No reliable, secure marketplace specifically built for FiveM.
  • No protection for digital content: files could be freely redistributed.
  • Lack of real-time support to resolve purchase or installation questions.
  • Manual inventory and order management with no centralized admin panel.

The Solution

I designed and developed a full-featured e-commerce platform for the FiveM community, combining secure payments, protected digital content downloads, and real-time support via WebSockets.

  1. 01

    Full E-commerce

    Shopping cart, discount system, and secure payment gateway integrated with Stripe Checkout.

  2. 02

    Secure Downloads

    One-time-use temporary token system to protect digital content and prevent unauthorized redistribution.

  3. 03

    Admin Panel

    Complete management of products, categories, orders, and customer support from a single dashboard.

  4. 04

    Real-time Support

    Integrated ticket chat with instant notifications via Socket.io for seamless customer service.

  5. 05

    Multi-language

    Full support for Spanish and English via next-intl with automatic language detection.

  6. 06

    Premium Design

    Responsive interface with dark mode, smooth animations, and a high-quality user experience.

Tech Stack

Built with 10 modern technologies, chosen to be fast, secure and easy to maintain.

Next.jsReactPostgreSQLPrismaStripeSocket.io
See the full technical breakdown

Framework

Next.js 16

Frontend

React 19

Language

TypeScript

Database

PostgreSQL

ORM

Prisma

Payments

Stripe

Realtime

Socket.io

Styling

TailwindCSS

i18n

next-intl

Email

Nodemailer

Technical Challenges

Secure Download System

Protecting digital content required implementing one-time download tokens with temporal expiration. Each token is generated after payment confirmation, stored in the database, and automatically invalidated after first use, preventing unauthorized redistribution.

download-token.tstypescript
// Generate a one-time signed download token
export async function generateDownloadToken(orderId: string, productId: string) {
  const token = crypto.randomUUID();
  const expiresAt = new Date(Date.now() + 15 * 60 * 1000); // 15 min

  await db.downloadToken.create({
    data: { token, orderId, productId, expiresAt, used: false },
  });

  return token;
}

// Validate and consume the token (one-time use)
export async function consumeDownloadToken(token: string) {
  const record = await db.downloadToken.findUnique({ where: { token } });

  if (!record || record.used || record.expiresAt < new Date()) {
    throw new Error('Invalid or expired download token');
  }

  await db.downloadToken.update({ where: { token }, data: { used: true } });
  return record;
}

WebSockets in a Serverless Environment

Maintaining persistent Socket.io connections on a serverless platform like Vercel was the biggest challenge. The solution was migrating to Pusher as a managed WebSocket provider, enabling real-time notifications without a dedicated server.

Have a similar problem?

Tell me how you handle it today and I will tell you what can be automated or improved.

Tell me what's holding you back