https://github.com/voltamon/hackathon-starter-template
https://github.com/voltamon/hackathon-starter-template
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/voltamon/hackathon-starter-template
- Owner: Voltamon
- Created: 2025-08-20T15:46:01.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-08-21T16:26:25.000Z (10 months ago)
- Last Synced: 2025-08-21T19:11:25.815Z (10 months ago)
- Language: TypeScript
- Size: 29.3 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Starter Fullstack Template
This repository contains a minimal full-stack starter app:
- Frontend: Vite + Preact + TypeScript, serves on port 3000
- Backend: Go + Gin, serves API on port 8080
- Pocketbase: runs on port 8090
Getting started (Windows PowerShell):
1. Build and start all services:
```
docker-compose up --build
```
2. Frontend will be available at http://localhost:3000
3. Backend API: http://localhost:8080/api/hello
4. Pocketbase admin: http://localhost:8090
Notes:
- The frontend Dockerfile runs Vite in dev mode. For production, build the frontend and serve static files from a simple web server.
- The backend uses CORS allowing all origins for development. Lock this down in production.
Development tips
- From PowerShell you can run the whole stack with:
```
docker-compose up --build
```
- To only run frontend locally (hot-reload) without Docker:
```
cd frontend; npm install; npm run dev
```
- To build frontend for production and serve statically (example):
```
cd frontend; npm install; npm run build
# then serve the 'dist' folder with any static server
```
Requirements coverage
- Frontend: Vite with Preact and TypeScript -> Done (`frontend/package.json`, `vite.config.ts`, `tsconfig.json`, `src`)
- Frontend index.html linking Pico CSS and app entry -> Done (`frontend/index.html`)
- Frontend App with button fetching backend -> Done (`frontend/src/App.tsx`, `src/api.ts`)
- Backend: Go Gin server with CORS and GET /api/hello -> Done (`backend/main.go`)
- Backend Dockerfile -> Done (`backend/Dockerfile`)
- Pocketbase service -> Done (`docker-compose.yml`)
- Frontend Dockerfile and compose wiring -> Done (`frontend/Dockerfile`, `docker-compose.yml`)
Notes / assumptions
- The frontend Dockerfile runs Vite in dev mode for simplicity. For production, replace with a multi-stage build that builds assets and serves them with a static server.
- The compose file maps ports 3000, 8080, 8090 on the host. If these are occupied, change them in `docker-compose.yml`.
- This is a minimal example intended for local development.