const express = require('express');
const router = express.Router();

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

router.get('/', (req, res) => {
  res.json({
    name: 'BillTracker',
    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;
