chore: initial project scaffold with Fastify server and Vite React app

Set up monorepo structure with server/ (Fastify + TypeScript) and web/ (React + Vite + TypeScript).
Includes package configs, dev proxy setup, and mobile-first CSS foundation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Bas van Rossem
2026-02-19 16:14:30 +01:00
commit 6d60d714d0
17 changed files with 6102 additions and 0 deletions

3
server/src/config.ts Normal file
View File

@@ -0,0 +1,3 @@
export const PORT = parseInt(process.env.PORT || '3000', 10);
export const DB_PATH = process.env.DB_PATH || './data/spelljammer.sqlite';
export const NODE_ENV = process.env.NODE_ENV || 'development';

20
server/src/index.ts Normal file
View File

@@ -0,0 +1,20 @@
import Fastify from 'fastify';
import { PORT } from './config.js';
const app = Fastify({ logger: true });
app.get('/', async () => {
return { name: 'Spelljammer Ship Tracker API', status: 'ok' };
});
const start = async () => {
try {
await app.listen({ port: PORT, host: '0.0.0.0' });
console.log(`Server running on port ${PORT}`);
} catch (err) {
app.log.error(err);
process.exit(1);
}
};
start();