Quickstart Guide
Get your MTB Backend API up and running in less than 5 minutes. This guide will walk you through installation, configuration, and making your first API call.Prerequisites
Before you begin, ensure you have:- Node.js version 20.x or higher (up to 24.x)
- npm version 6.0.0 or higher
- A code editor (VS Code recommended)
- Basic knowledge of REST APIs
You can check your Node.js version by running
node --version in your terminal.Installation Steps
Install Dependencies
Install all required npm packages:This will install Strapi 5.33.4 and all dependencies including:
@strapi/strapi- Core Strapi framework@strapi/plugin-users-permissions- Authenticationbetter-sqlite3- Default databaseaxios- HTTP client for Flow integration
Configure Environment Variables
Create a
.env file in the root directory with the following variables:Start the Development Server
Launch Strapi in development mode with auto-reload:You should see output similar to:
Make Your First API Call
Now that your backend is running, let’s make your first API request.1. Get API Token (Optional for Public Routes)
For protected endpoints, you’ll need an API token. For public routes, you can skip this step.2. Fetch Club Information
Retrieve club data using the REST API:3. Create a News Article
Create a new noticia (news article) via the API:Understanding the Response
Strapi returns data in a standardized format:Understanding Strapi 5 Response Structure
Understanding Strapi 5 Response Structure
Strapi 5 uses a structured response format:
data: Contains the actual content (array for collections, object for single entries)documentId: Unique identifier for each document (replacesidin Strapi 5)attributes: The actual field valuesmeta: Metadata including pagination information
Available API Endpoints
Your MTB Backend exposes these RESTful endpoints:| Content Type | Endpoint | Description |
|---|---|---|
| Club | /api/clubs | Club information |
| Noticias | /api/noticias | News articles |
| Inscripciones | /api/inscripcions | Event registrations |
| Inscritos | /api/inscritos | Participant profiles |
| Mensajes | /api/mensajes | Contact messages |
| Flow Payments | /api/flow/pagar | Payment processing |
All endpoints support standard REST operations: GET (list/retrieve), POST (create), PUT (update), DELETE (remove)
Next Steps
Explore the Admin Panel
Navigate to
/admin to manage your content types and create entriesConfigure Permissions
Set up public/authenticated access in Settings → Users & Permissions
Set Up Flow Payments
Configure Flow payment gateway for registration processing
Read the Full Installation Guide
Learn about production deployment and advanced configuration
Common Issues
Port 1337 is already in use
Port 1337 is already in use
Change the
PORT variable in your .env file to a different port:Database connection errors
Database connection errors
If using SQLite (default), ensure the
.tmp directory exists and has write permissions:APP_KEYS error on startup
APP_KEYS error on startup
Generate secure random keys using:Run this 4 times and add them to
.env as a comma-separated string.Testing the Payment Flow
To test the Flow payment integration:
You’re now ready to build your mountain biking club platform! 🚴♂️
