Skip to content

CoR-Forum/RegnumOnlineForumArchive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Regnum Online Forum Archive

A static archive of the Champions of Regnum community forum. This application provides a modern web interface for browsing historical forum discussions, posts, and user profiles from the Regnum Online community.

Features

  • Read-only archive with search capabilities across threads, posts, and users
  • Multi-language support for English, EspaΓ±ol, Deutsch, PortuguΓͺs, FranΓ§ais, and Italiano
  • REST API for programmatic access to forum data
  • Responsive design built with Bootstrap 5
  • Docker deployment ready for production use

Quick Start

Requirements

  • Docker and Docker Compose
  • regnumforum.db SQLite database file (contact maintainers for access)

Installation

git clone https://github.com/CoR-Forum/RegnumOnlineForumArchive.git
cd RegnumOnlineForumArchive
docker compose up -d --build

Open http://localhost:3000 in your browser.

Development

npm install
npm run dev  # Development server with hot reload
npm start    # Production server

API Documentation

Base URL: http://localhost:3000/api

Threads

List threads

GET /api/threads

Parameters:

  • language (string) - Filter by language: "English", "EspaΓ±ol", "Deutsch", "PortuguΓͺs", "FranΓ§ais", "Italiano"
  • category (string) - Filter by forum category
  • search (string) - Search thread titles and content
  • page (integer) - Page number (default: 1)
  • limit (integer) - Items per page (default: 20, max: 100)
  • random (boolean) - Return random threads instead of chronological order

Response:

{
  "success": true,
  "data": {
    "threads": [
      {
        "id": 123,
        "name": "Thread Title",
        "language": "English",
        "category": "General Discussion",
        "threadCreator": "Username",
        "threadCreatorId": 456,
        "createdTime": "2023-01-15 14:30:00",
        "lastPoster": "LastUser",
        "lastPosterId": 789,
        "lastPostTime": "2023-01-20 16:45:00",
        "postCount": 25
      }
    ],
    "pagination": {
      "page": 1,
      "totalPages": 10,
      "totalThreads": 200,
      "hasNext": true,
      "hasPrev": false
    }
  }
}

Get thread details

GET /api/threads/:id

Response:

{
  "success": true,
  "data": {
    "thread": {
      "id": 123,
      "name": "Thread Title",
      "language": "English",
      "category": "General Discussion",
      "threadCreator": "Username",
      "threadCreatorId": 456,
      "createdTime": "2023-01-15 14:30:00",
      "lastPoster": "LastUser",
      "lastPosterId": 789,
      "lastPostTime": "2023-01-20 16:45:00",
      "postCount": 25,
      "path": "/Forum/English/General Discussion/Thread Title"
    }
  }
}

Get thread posts

GET /api/threads/:id/posts

Parameters:

  • page (integer) - Page number (default: 1)
  • limit (integer) - Posts per page (default: 20, max: 50)

Response:

{
  "success": true,
  "data": {
    "posts": [
      {
        "id": 789,
        "threadId": 123,
        "userId": 456,
        "username": "PostAuthor",
        "message": "<p>Post content with HTML formatting</p>",
        "timestamp": "2023-01-15 14:35:00",
        "postNo": 1
      }
    ],
    "pagination": {
      "page": 1,
      "totalPages": 3,
      "totalPosts": 25,
      "hasNext": true,
      "hasPrev": false
    }
  }
}

Get thread metadata

GET /api/threads/meta/languages

Response:

{
  "success": true,
  "data": [
    "English",
    "EspaΓ±ol", 
    "Deutsch",
    "PortuguΓͺs",
    "FranΓ§ais",
    "Italiano"
  ]
}

Users

List users

GET /api/users

Parameters:

  • search (string) - Search usernames
  • page (integer) - Page number (default: 1)
  • limit (integer) - Users per page (default: 20, max: 100)

Response:

{
  "success": true,
  "data": {
    "users": [
      {
        "id": 456,
        "name": "Username",
        "postCount": 150,
        "threadCount": 12,
        "firstPost": "2022-05-10 09:15:00",
        "lastPost": "2023-01-20 16:45:00"
      }
    ],
    "pagination": {
      "page": 1,
      "totalPages": 25,
      "totalUsers": 500,
      "hasNext": true,
      "hasPrev": false
    }
  }
}

Get user details

GET /api/users/:id

Response:

{
  "success": true,
  "data": {
    "user": {
      "id": 456,
      "name": "Username",
      "postCount": 150,
      "threadCount": 12,
      "firstPost": "2022-05-10 09:15:00",
      "lastPost": "2023-01-20 16:45:00",
      "joinDate": "2022-05-10 09:15:00"
    }
  }
}

Get user posts

GET /api/users/:id/posts

Parameters:

  • page (integer) - Page number (default: 1)
  • limit (integer) - Posts per page (default: 20, max: 50)

Response:

{
  "success": true,
  "data": {
    "posts": [
      {
        "id": 789,
        "threadId": 123,
        "threadName": "Thread Title",
        "message": "<p>Post content</p>",
        "timestamp": "2023-01-15 14:35:00",
        "postNo": 1
      }
    ],
    "pagination": {
      "page": 1,
      "totalPages": 8,
      "totalPosts": 150,
      "hasNext": true,
      "hasPrev": false
    }
  }
}

Get user threads

GET /api/users/:id/threads

Parameters:

  • page (integer) - Page number (default: 1)
  • limit (integer) - Threads per page (default: 20, max: 50)

Response:

{
  "success": true,
  "data": {
    "threads": [
      {
        "id": 123,
        "name": "Thread Title",
        "language": "English",
        "category": "General Discussion",
        "createdTime": "2023-01-15 14:30:00",
        "postCount": 25
      }
    ],
    "pagination": {
      "page": 1,
      "totalPages": 1,
      "totalThreads": 12,
      "hasNext": false,
      "hasPrev": false
    }
  }
}

Statistics

Get overview statistics

GET /api/stats/overview

Response:

{
  "success": true,
  "data": {
    "totalUsers": 1500,
    "totalThreads": 850,
    "totalPosts": 12000,
    "totalLanguages": 6
  }
}

Get comprehensive statistics

GET /api/stats

Response:

{
  "success": true,
  "data": {
    "overview": {
      "totalUsers": 1500,
      "totalThreads": 850,
      "totalPosts": 12000,
      "totalLanguages": 6
    },
    "languages": [
      {
        "language": "English",
        "flag": "πŸ‡ΊπŸ‡Έ",
        "thread_count": 450,
        "post_count": 8000,
        "percentage": 66.67
      }
    ],
    "mostActiveUsers": [
      {
        "id": 456,
        "name": "Username",
        "post_count": 150,
        "rank": 1,
        "medal": "πŸ₯‡"
      }
    ],
    "yearlyActivity": [
      {
        "year": 2023,
        "post_count": 2500,
        "percentage": 85.5
      }
    ],
    "topCategories": [
      {
        "category": "General Discussion",
        "full_category": "Forum/English/General Discussion",
        "display_category": "Forum β€Ί English β€Ί General Discussion",
        "post_count": 3000,
        "rank": 1,
        "percentage": 100.0
      }
    ]
  }
}

Get language statistics

GET /api/stats/languages

Response:

{
  "success": true,
  "data": [
    {
      "language": "English",
      "flag": "πŸ‡ΊπŸ‡Έ",
      "thread_count": 450,
      "post_count": 8000,
      "percentage": 66.67
    }
  ]
}

Get user activity statistics

GET /api/stats/users?limit=10

Get yearly activity statistics

GET /api/stats/activity

Get category statistics

GET /api/stats/categories?limit=10

Get categories

GET /api/threads/meta/categories?language=English

Response:

{
  "success": true,
  "data": [
    {
      "category": "General Discussion",
      "thread_count": 120,
      "post_count": 3000
    },
    {
      "category": "Suggestions & Ideas",
      "thread_count": 85,
      "post_count": 1200
    }
  ]
}

System

Health check

GET /api/health

Response:

{
  "success": true,
  "status": "healthy",
  "timestamp": "2023-01-15T14:30:00.000Z",
  "uptime": 3600.5,
  "database": "connected"
}

Error Responses

All endpoints return errors in this format:

{
  "success": false,
  "error": "Error message",
  "code": "ERROR_CODE"
}

HTTP status codes: 200 (success), 400 (bad request), 404 (not found), 429 (rate limited), 500 (server error)

Project Structure

β”œβ”€β”€ src/                    # Backend API
β”‚   β”œβ”€β”€ app.js             # Express server
β”‚   β”œβ”€β”€ middleware/        # Custom middleware (empty)
β”‚   β”œβ”€β”€ models/database.js # SQLite database layer
β”‚   β”œβ”€β”€ routes/            # API endpoints (threads, users, stats)
β”‚   └── utils/helpers.js   # Server utilities
β”œβ”€β”€ public/                # Frontend SPA
β”‚   β”œβ”€β”€ index.html         # Main HTML
β”‚   β”œβ”€β”€ assets/            # Static assets (logos)
β”‚   β”œβ”€β”€ css/forum.css      # Stylesheets
β”‚   └── js/                # JavaScript modules (app, api, router, components, utils)
β”œβ”€β”€ regnumforum.db         # SQLite database
β”œβ”€β”€ docker-compose.yml     # Docker configuration
β”œβ”€β”€ Dockerfile             # Node.js container
└── package.json           # Node.js dependencies

Database Requirements

The application requires a SQLite database file named regnumforum.db containing the forum archive data. This file must be present in the root directory for the application to function.

Database Schema:

  • threads - Forum thread discussions
  • posts - Individual post messages
  • users - User profiles and statistics
  • Additional metadata tables for categories and languages

Environment Variables

  • NODE_ENV - Runtime environment (production/development)
  • PORT - Server port (default: 3000)
  • DB_PATH - SQLite database path (default: ./regnumforum.db)

Future Development

We are planning to expand the archive by scraping additional historical forum data from archive.org (Wayback Machine) to preserve even more community discussions that may not be in the current database.

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Links

About

This archive preserves the historical discussions from the Champions of Regnum gaming community. Regnum Online is a medieval fantasy MMORPG that has fostered a dedicated international community for many years. This project ensures that valuable community discussions, guides, and memories remain accessible to current and future players.

About

An archive of the official Champions of Regnum Forum

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors