Peeper's backend is a Spring Boot application that provides the server-side functionality using Spring AI, MySQL, and GraphQL.
The application stores snapshots of a video feed into a database, and compares successive frames for activity which is then reported to the user.
- Java 23 (JDK)
- MySQL 8.0 or higher
- Maven
- An OpenAI API key (for vision services)
- Optional: Ollama for local LLM support
- Create a MySQL schema named
peeper
- Default developer credentials (can be modified in
application.yml
, please DO NOT use these defaults on a production instance!):- Username: root
- Password: password
- Port: 3306
The application can be configured through application.yml
. Key configurations include:
- Server port: 5000
- Database connection details
- OpenAI API key (required for vision services)
- API key can also be set in an envionment variable,
- Spring Boot Admin settings
- CORS settings for frontend applications
- Clone the repository
- Configure your OpenAI API key in
application.yml
or set it in the environment variableSPRING_AI_OPENAI_API_KEY
- Build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
- GraphQL API
- Spring Security integration (currently configured to permit all requests)
- Spring Boot Admin for monitoring and management
- Async support configured for handling concurrent requests
- Image comparison services using OpenAI or local Ollama model (must support multimodal)
- Flyway database migrations
- Cross-Origin Resource Sharing (CORS) configured for frontend applications
- Supports database-provided settings for vision provider and model. To override application.yml, add the following entries into the
Settings
table:- comparison_provider,GLOBAL,openai
- comparison_model,GLOBAL,gpt-4o
- The application uses Flyway for database migrations
- GraphiQL interface is available at
/graphiql
when running in development - Actuator endpoints are exposed at
/actuator/*
- Spring Boot Admin console is accessible for monitoring at
/instances
- Test database configuration is provided for integration tests
- JUnit and Spring Boot Test dependencies are included
- TestContainers support for integration testing
The current security configuration permits all requests (permitAll()
). This should be properly configured before deploying to production. Database credentials should be changed to avoid using root user and default password.
Spring Boot Admin is configured for monitoring the application. Access the admin console at:
For more details about specific components or for contributing guidelines, please contact the project maintainers.