https://github.com/antistereov/singularity-core
The foundation for your next backend! Build your app with everything from authentication to content management, ready out of the box. π
https://github.com/antistereov/singularity-core
framework java kotlin spring
Last synced: 3 months ago
JSON representation
The foundation for your next backend! Build your app with everything from authentication to content management, ready out of the box. π
- Host: GitHub
- URL: https://github.com/antistereov/singularity-core
- Owner: antistereov
- License: gpl-3.0
- Created: 2025-07-02T12:56:31.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-12-26T12:49:51.000Z (3 months ago)
- Last Synced: 2025-12-27T03:27:27.584Z (3 months ago)
- Topics: framework, java, kotlin, spring
- Language: Kotlin
- Homepage: https://singularity.stereov.io
- Size: 36.7 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Singularity
Welcome to the foundation for your next backend!
Build your app with everything from authentication to content management, ready out of the box. π
Save time, ensure consistency, and focus on features whether you're building an API,
a microservice, or a full-stack app.
## β‘ Why Use This?
- β
**Batteries Included:** Authentication with 2FA and email verification, content management, file storage, and key rotation already set up.
- β
**Production-Ready by Default:** All components are built with real-world usage and scalability in mind. This foundation is built on [Spring](https://spring.io), ensuring a reliable, mature, and modern technology stack.
- β
**Open & Extensible:** Contributions welcome! Letβs refine this into a toolkit others can benefit from too.
## π Features at a Glance
### **Authentication & User Management**
- π JWT auth with refresh tokens, 2FA, secure HTTP-only cookies.
- π§ Email verification with expiration and resend control.
- π§βπ» Role-based user access with custom exceptions for better error handling.
### **Data & Caching**
- πΎ MongoDB for persistence, Redis for caching and session storage.
- ποΈ S3-based object storage abstraction with local fallback.
### **Content Management**
- π§© Abstract base for content types with **built-in access control** (users, groups, roles).
- π **Multi-language support** out-of-the-box β store and serve content in multiple locales.
- π·οΈ Configurable tagging system for flexible content organization.
- π Prebuilt `Article` class for instant publishing workflows.
### **Security & Key Management**
- π Secret manager integration with **automated key rotation** for your secrets.
### **Performance**
- βοΈ Kotlin Coroutines for async flows.
- π¦ Configurable IP and user-based rate limiting.
## π Quickstart
### 1. Create a new project
Use your favorite IDE or build tool to create a new Java or Kotlin project with JDK 21 or higher.
### 2. Add Singularity to your dependencies
Add the dependency to your `build.gradle.kts`, `build.gradle` or `pom.xml` if using Maven:
**For Gradle with Kotlin DSL:**
```kotlin
dependencies {
implementation("io.stereov.singularity:core:") // Check the maven status batch for the latest version
}
```
**For Gradle with Groovy:**
```groovy
dependencies {
implementation 'io.stereov.singularity:core:' // Check the maven status batch for the latest version
}
```
**For Maven:**
```xml
io.stereov.singularity
core
_version_
```
### 3. Start MongoDB and Redis
Download the [docker-compose.yaml](https://github.com/antistereov/singularity-core/blob/354c7258e0b6416b108639224fc075d51830198b/infrastructure/docker/docker-compose.yaml)
to the root of your project and run the containers using:
```bash
docker compose up -d
```
You have a running instance of MongoDB as your database and Redis as your Cache.
### 4. Create your application class
Create a Spring Boot Application in Kotlin:
```kotlin
@SpringBootApplication
class YourApplication
fun main() {
runApplication()
}
```
Or in Java:
```java
@SpringBootApplication
public class App {
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}
}
```
### 5. Expand
Add your custom services and features to create your dream. Focus on what matters.
## π Documentation
You can find a detailed guide to this library here: [https://singularity.stereov.io](https://singularity.stereov.io).
It also provides a test application to test the preconfigured endpoints in Swagger UI or your favorite tool.
## π€ Contribution Guidelines
We welcome contributions! To get started, please follow these steps:
1. **Fork** the repository.
2. **Create** a new branch:
```bash
git checkout -b your-feature-name
```
3. **Commit** your changes:
```bash
git commit -am "Describe your feature or fix"
```
4. **Push** the branch to your fork:
```bash
git push origin your-feature-name
```
5. **Open a pull request** with a clear and detailed description of your changes.
> β οΈ **Note:**
> This repository is a mirror of the monorepo where all libraries and apps are developed.
> If your pull request is accepted, the changes will be manually merged into the monorepo and then reflected here.
## π License
This project is licensed under the GPLv3 Licenseβsee the [LICENSE](../../LICENSE) file for details.
If you intend for commercial use, please contact me at [contact@stereov.io](mailto:contact@stereov.io).