Skip to content

Latest commit

ย 

History

207 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

S.P.L.U.R.T. Station Logo

S.P.L.U.R.T. Station Website

The official website for S.P.L.U.R.T. Station - a NSFW furry roleplaying server for Space Station 13

Tests Deploy to VPS

Astro Bun Solid.js Tailwind CSS TypeScript

๐ŸŒ Live Website


โœจ About

S.P.L.U.R.T. Station is a multiplayer sandbox roleplaying game built on Space Station 13. This repository contains the source code for the official website at splurt.space.

The website features:

  • ๐ŸŽฎ Information about the game and how to play
  • ๐Ÿ–ผ๏ธ Media gallery with screenshots and videos
  • ๐ŸŽต Music player with YouTube playlist integration
  • ๐Ÿ“ฑ Responsive design with pixel-art aesthetics
  • โšก Fast, static-first architecture with SSR capabilities

Inspired by https://github.com/spacestation13/website

๐Ÿ› ๏ธ Tech Stack

Category Technology
Framework Astro 5.x
Runtime Bun
UI Components Solid.js
Styling Tailwind CSS 4.x
Linting Ultracite (Biome)
Deployment Docker + Dokploy (PM2 in-container) or PM2 on VPS

๐Ÿ“‹ Prerequisites

  • Bun 1.x or later
  • Node.js 18+ (for some dev dependencies)

๐Ÿš€ Getting Started

Installation

# Clone the repository
git clone https://github.com/SPLURT-Station/splurt-webpage.git
cd splurt-webpage

# Install dependencies
bun install

Development Server

# Start the development server at http://localhost:4321
bun dev

Building for Production

# Build the site to ./dist/
bun build

# Preview the production build locally
bun preview

๐Ÿ“œ Available Scripts

Command Description
bun dev Start development server at localhost:4321
bun build Build production site to ./dist/
bun preview Preview production build locally
bun start Run the production server (after build)
bun test Run all tests
bun test:watch Run tests in watch mode
bun test:coverage Run tests with coverage report
bun lint Fix linting issues with Ultracite
bun lint:check Check for linting issues without fixing

PM2 Commands (Production)

Command Description
bun pm2:start Start the application with PM2
bun pm2:stop Stop the PM2 process
bun pm2:restart Restart the PM2 process
bun pm2:logs View PM2 logs
bun pm2:status Check PM2 process status

๐Ÿ“ Project Structure

splurt-webpage/
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/          # GitHub Actions CI/CD
โ”‚       โ”œโ”€โ”€ deploy-vps.yml  # Production deployment
โ”‚       โ””โ”€โ”€ test.yml        # Testing workflow
โ”œโ”€โ”€ public/                 # Static assets (fonts, images)
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ actions/           # Astro server actions
โ”‚   โ”œโ”€โ”€ assets/            # Processed assets (images, videos, logos)
โ”‚   โ”œโ”€โ”€ components/        # Reusable components
โ”‚   โ”‚   โ”œโ”€โ”€ age-gate/      # Age verification modal
โ”‚   โ”‚   โ”œโ”€โ”€ hero-header/   # Hero section component
โ”‚   โ”‚   โ”œโ”€โ”€ media-tabs/    # Media gallery tabs
โ”‚   โ”‚   โ”œโ”€โ”€ music-player/  # YouTube music player
โ”‚   โ”‚   โ”œโ”€โ”€ navigation/    # Site navigation
โ”‚   โ”‚   โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ layouts/           # Page layouts
โ”‚   โ”œโ”€โ”€ pages/             # Route pages
โ”‚   โ”œโ”€โ”€ styles/            # Global styles (ITCSS architecture)
โ”‚   โ”œโ”€โ”€ test/              # Test files
โ”‚   โ””โ”€โ”€ utils/             # Utility functions
โ”œโ”€โ”€ astro.config.mjs       # Astro configuration
โ”œโ”€โ”€ tailwind.config.ts     # Tailwind CSS configuration
โ”œโ”€โ”€ biome.json             # Biome/Ultracite configuration
โ””โ”€โ”€ package.json

๐ŸŽจ Styling Architecture

This project uses the ITCSS (Inverted Triangle CSS) architecture combined with Tailwind CSS. See src/styles/README.md for detailed documentation.

Key principles:

  • Utility-first approach with Tailwind CSS
  • Component-specific styles follow the principle of locality (CSS files live next to their components)
  • Design tokens defined in CSS variables for consistency
  • Custom pixel-art fonts for game-themed aesthetics

๐Ÿงช Testing

# Run all tests
bun test

# Run tests in watch mode
bun test:watch

# Run tests with coverage
bun test:coverage

# Run Astro type checking
bun astro check

See TESTING.md for the complete testing guide.

๐Ÿ”ง Development

Code Quality

This project uses Ultracite, a zero-config Biome preset for linting and formatting:

# Auto-fix linting issues
bun lint

# Check without fixing
bun lint:check

Pre-commit Hooks

Husky is configured to run linting before each commit to ensure code quality.

Environment Variables

Create a .env file based on the required secrets (see .github/workflows/deploy-vps.yml for the list of expected environment variables):

# Media configuration
PUBLIC_MEDIA_SPLASH_SOURCE_TYPE=...
PUBLIC_MEDIA_SPLASH_BASE_URL=...
PUBLIC_MEDIA_SPLASH_PATTERNS=...

# YouTube integration
PUBLIC_YOUTUBE_PLAYLIST_ID=...
PUBLIC_YOUTUBE_API_KEY=...

๐Ÿšข Deployment

Dokploy (Docker + PM2)

The repo includes a multi-stage Dockerfile and docker-compose.dokploy.yml for Dokploy: the image is built from the repository on each deploy, and the app runs under pm2-runtime (PM2 as PID 1 โ€” auto-restart, logs).

  1. In Dokploy, create a Docker Compose service and point it at this repository.
  2. Set Compose path to docker-compose.dokploy.yml.
  3. Environment variables (Dokploy docs: Docker Compose โ†’ Environment): use the built-in editor โ€” Dokploy writes a .env file next to your compose file. The compose service uses:
    • build.args to pass PUBLIC_*, MEDIA_*, and YouTube variables into the Docker build stage (so Vite/Astro can inline import.meta.env.* during bun run build), and
    • env_file: .env + environment to provide runtime variables to the container on start. Fill values from .env.example.
  4. The compose file binds 127.0.0.1:${PUBLISH_PORT:-4321} โ†’ container ${PORT:-4321} so only local nginx can reach the app. In nginx: proxy_pass http://127.0.0.1:4321; (or whatever PUBLISH_PORT you set). If you change PORT in .env, update the right-hand side of the ports: mapping in docker-compose.dokploy.yml to match.

Creating .env on the server (SSH)
If you prefer a file on disk, SSH into the host and create .env in the same directory as the compose file Dokploy uses (the deployment working directory), then redeploy. Example:

cd /path/to/dokploy/compose/project   # your actual path from Dokploy
nano .env   # paste variables from .env.example

Auto Deploy + persistent secrets
Dokploy re-clones the repo on each deploy, so a .env you only put inside the clone can disappear. Prefer the Environment tab in Dokploy, or a File Mount (Advanced โ†’ Mounts) and change env_file to e.g. ../files/splurt-webpage.env per Dokploy file mounts.

Local Docker smoke test

cp .env.example .env   # fill in values
docker compose -f docker-compose.dokploy.yml up --build
# Or: docker build -t splurt-webpage . && docker run --rm -p 4321:4321 --env-file .env splurt-webpage

VPS via GitHub Actions (legacy)

The site can still be deployed to a self-hosted runner (Proxmox LXC) on push to main / master (.github/workflows/deploy-vps.yml): build on the runner, .env from GitHub secrets, PM2 on the host.

Manual deployment (no Docker)

bun build
bun pm2:start   # or bun start

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: bun test
  5. Run linting: bun lint
  6. Commit your changes: git commit -m 'Add amazing feature'
  7. Push to the branch: git push origin feature/amazing-feature
  8. Open a Pull Request

Made with ๐Ÿ’œ by the S.P.L.U.R.T. Station team

About

Webpage of S.P.L.U.R.T.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages