// @ts-nocheck — route controller converted to .cts; handler req/res typed, full type-check deferred (thin glue over typed services).
import type { Req, Res, Next } from '../types/http';
const express = require('express');
const router = express.Router();

let pkg;
try {
  pkg = require('../package.json');
} catch {
  pkg = { version: '0.1.0' };
}

router.get('/', (req: Req, res: Res) => {
  res.json({
    name: 'Bill Tracker',
    version: pkg.version,
    description:
      'A self-hosted app for tracking recurring bills, monthly payments, due dates, categories, and personal bill history.',
    stack: {
      backend: 'Node.js / Express',
      frontend: 'React',
      database: 'SQLite',
    },
    ai_assisted: true,
    links: {
      release_notes: '/release-notes',
      privacy: '/privacy',
    },
  });
});

module.exports = router;
