Skip to content

WonGames API is the backend service for an advanced React-based e-commerce platform for video games. Built with Strapi and PostgreSQL, it manages games, categories, developers, orders, Stripe payments, wishlists, and user profiles. This project is part of the React Avançado course, designed to teach modern React development concepts.

License

Notifications You must be signed in to change notification settings

Pedro-Estevao/wongames-api

Repository files navigation

WonGames - E-commerce API


Shows an illustrated sun in light mode and a moon with stars in dark mode.

This is the API developed with Strapi to manage data for WonGames, an e-commerce platform for games created as part of the React Avançado Course. The project teaches modern development concepts with React and related technologies.

📌 About the Project

illustrative image

The WonGames API is responsible for managing various entities of the e-commerce platform, including:

  • 🏆 Games: Registering and listing available games.
  • 🎭 Categories: Categorizing games by genre and type.
  • 🛍️ Orders: Managing user purchases.
  • 💳 Stripe Integration: Processing secure payments.
  • Wishlist: Custom wishlists for each user.
  • 👤 User Profiles: Access control and experience customization.

This project uses PostgreSQL as the database and can be run locally or via Docker.

illustrative image

➡️ Client Repository (e-commerce frontend): WonGames Client

🚀 Requirements

To run the API, you need to have PostgreSQL installed or use a Docker container. The database configuration can be found in the config/database.ts.

🔧 Setup and Installation

1️. Install dependencies:

$ npm install

2️. Create the .env file

Create an .env file in the root of the project, or edit if it already exists, similar to the following structure:

# Server
HOST="0.0.0.0"
PORT="1337"

# Secrets
APP_URL="tobemodified"
APP_KEYS="toBeModified1,toBeModified2"
API_TOKEN_SALT="tobemodified"
ADMIN_JWT_SECRET="tobemodified"
TRANSFER_TOKEN_SALT="tobemodified"

# GOG API
GOG_URL="https://www.gog.com"
GOG_API_URL="https://catalog.gog.com/v1/catalog"

# Database
DATABASE_CLIENT="postgres"
DATABASE_HOST="127.0.0.1"
DATABASE_PORT="5432"
DATABASE_NAME="tobemodified"
DATABASE_USERNAME="postgres"
DATABASE_PASSWORD="tobemodified"
DATABASE_SSL="false"
DATABASE_FILENAME=
JWT_SECRET="tobemodified"

# Email
SMTP_HOST="tobemodified"
SMTP_PORT="tobemodified"
SMTP_USERNAME="tobemodified"
SMTP_PASSWORD="tobemodified"

# Stripe
STRIPE_KEY="tobemodified"

📜 Commands

dev

Start your Strapi application with autoReload enabled. Learn more

$ npm run dev

start

Start your Strapi application with autoReload disabled. Learn more

$ npm run start

build

Build your admin panel. Learn more

$ npm run build

☁️ Deployment

Strapi gives you many possible deployment options for your project including Strapi Cloud. Browse the deployment section of the documentation to find the best solution for your use case.

About

WonGames API is the backend service for an advanced React-based e-commerce platform for video games. Built with Strapi and PostgreSQL, it manages games, categories, developers, orders, Stripe payments, wishlists, and user profiles. This project is part of the React Avançado course, designed to teach modern React development concepts.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published