This Spring-based API allows users to subscribe to tournaments and make secure payments using credit cards. Stripe is used as the payment processing service. The API includes a Docker Compose setup for local development with a PostgreSQL database.
- User registration and authentication
- Tournament subscription management
- Credit card payments through Stripe
- Local development environment using Docker Compose with PostgreSQL
- Java 21 or higher
- Gradle 8.0 or higher
- Docker and Docker Compose
git clone https://github.com/lucasguellis/playbeach-api.git
cd playbeach-api
Create a .env
file in the root directory to store sensitive information. Replace placeholders with your own values:
# Stripe API keys
STRIPE_SECRET_KEY=your-stripe-api-key
STRIPE_WEBHOOK_SECRET=your-stripe-webhook-secret
# Api secret key
SECRET_KEY=SECRET_KEY
docker-compose up postgres
This will start a PostgreSQL database and configure it for the API.
./gradlew bootRun
The API will be available at http://localhost:8080
.
Run the following command to execute tests:
./gradlew test
To deploy the application, ensure the environment variables are properly configured for your production environment. Then, build the project:
./gradlew build
Deploy the generated JAR or WAR file to your production server.
- Database Connection: Ensure the PostgreSQL database is running and the credentials in
.env
are correct. - Stripe Configuration: Verify that your Stripe API keys are valid and the webhook endpoint is properly configured.
This project is licensed under the MIT License. See the LICENSE file for details.