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.
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.
➡️ Client Repository (e-commerce frontend): WonGames Client
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
.
$ npm install
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"
Start your Strapi application with autoReload enabled. Learn more
$ npm run dev
Start your Strapi application with autoReload disabled. Learn more
$ npm run start
Build your admin panel. Learn more
$ npm run build
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.