Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Cache Maven dependencies
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Verify Maven wrapper
run: chmod +x mvnw

- name: Run tests
run: ./mvnw clean test

- name: Check code formatting
run: ./mvnw spotless:check
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ target
*.bkp
*.pyc
.coverage
.idea
.idea
logs/
*.log

# Maven wrapper jar (but keep properties)
.mvn/wrapper/maven-wrapper.jar
3 changes: 3 additions & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
wrapperVersion=3.3.4
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Viron

[![CI](https://github.com/Preponderous-Software/Viron/actions/workflows/ci.yml/badge.svg)](https://github.com/Preponderous-Software/Viron/actions/workflows/ci.yml)

**Viron** is your **foundational spatial simulation service** — the bedrock on which worlds are built.
It manages **environments**, **grids**, **locations**, and **entities** through a clean REST API so you can skip the boilerplate and focus on *fun, emergent gameplay*.

Expand Down
25 changes: 25 additions & 0 deletions legacy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Legacy Implementation

This directory contains the previous implementation of Viron that was moved here for reference during the MVP rebuild process.

## Structure

The legacy code includes:
- Java implementation with Spring Boot
- Python models and services
- Various test files
- Original pom.xml configuration

## Usage

This code is preserved for reference purposes during the rebuild. It should not be used in production and may contain technical debt or architectural issues that led to the decision to rebuild.

## Migration Notes

Key differences between legacy and new implementation:
- Java version updated from 21 to 17 for broader compatibility
- Improved error handling with global exception handler
- Better code formatting and style enforcement with Spotless
- Enhanced logging configuration with different profiles
- Streamlined package structure
- Updated dependencies and Spring Boot configuration
101 changes: 101 additions & 0 deletions legacy/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.4</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>preponderous</groupId>
<artifactId>viron</artifactId>
<version>0.6.0-SNAPSHOT</version>
<name>viron</name>
<description>Environment manager</description>
<properties>
<java.version>21</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>

</project>
21 changes: 21 additions & 0 deletions legacy/src/main/java/preponderous/viron/VironApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright (c) 2024 Preponderous Software
// MIT License

package preponderous.viron;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Import;

import preponderous.viron.config.DbConfig;
import preponderous.viron.config.ServiceConfig;

@SpringBootApplication
@Import({DbConfig.class, ServiceConfig.class})
public class VironApplication {

public static void main(String[] args) {
SpringApplication.run(VironApplication.class, args);
}

}
17 changes: 17 additions & 0 deletions legacy/src/main/java/preponderous/viron/config/OpenApiConfig.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package preponderous.viron.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OpenApiConfig {
@Bean
public OpenAPI customOpenAPI() {
return new OpenAPI()
.info(new Info()
.title("Viron API")
.version("0.5.0"));
}
}
50 changes: 43 additions & 7 deletions mvnw
100644 → 100755

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading