This guide will help you get started with developing Gloski.
- Go 1.22+ - for the server
- Node.js 20+ - for the frontend
- Git - for version control
git clone https://github.com/ss497254/gloski.git
cd gloski
# Install frontend dependencies
cd web && npm installYou need two terminals:
Terminal 1 - Backend:
cd server
GLOSKI_API_KEY=dev-key go run ./cmd/gloskiTerminal 2 - Frontend:
cd web
npm run dev- Open http://localhost:5173
- Click "Add Server"
- URL:
http://127.0.0.1:8080 - API Key:
dev-key
gloski/
├── server/ # Go backend
├── web/ # React frontend
├── docs/ # Documentation
├── README.md # Project overview
└── CONTRIBUTING.md # This file
See docs/frontend.md and docs/backend.md for detailed architecture.
- Formatting: Prettier (runs on save)
- Linting: ESLint with TypeScript rules
- Naming:
- Components:
PascalCase(e.g.,FilePreview.tsx) - Hooks:
camelCasewithuseprefix (e.g.,useFilesPage.ts) - Stores:
camelCase(e.g.,files.ts) - Utils:
camelCase(e.g.,formatBytes)
- Components:
- Formatting:
gofmt/goimports - Naming: Standard Go conventions
- Structure: Clean architecture with
internal/packages
- Feature code goes in
web/src/features/{feature-name}/ - Shared components go in
web/src/shared/components/ - Shared hooks go in
web/src/shared/hooks/ - UI primitives (shadcn) go in
web/src/ui/
- Handlers go in
server/internal/api/handlers/ - Services go in
server/internal/{service-name}/ - New routes are registered in
server/internal/api/routes/routes.go
cd web
# Type checking
npm run typecheck
# Build (catches errors)
npm run build
# Lint
npm run lintcd server
# Run tests
go test ./...
# Build
go build ./cmd/gloski- Create feature folder:
web/src/features/{name}/ - Add page component:
pages/{Name}Page.tsx - Add to feature registry:
web/src/app/feature-registry.ts - Add route:
web/src/app/routes.tsx
- Create handler in
server/internal/api/handlers/ - Register route in
server/internal/api/routes/routes.go - Add API method in
web/src/shared/services/api.ts
- Create component in
web/src/shared/components/ - Export from
web/src/shared/components/index.ts
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Test:
npm run build(frontend) andgo build ./cmd/gloski(backend) - Commit with clear messages
- Push and create a PR
type: short description
- Detail 1
- Detail 2
Types: feat, fix, refactor, docs, style, test, chore
- Check the docs/ folder for detailed documentation
- Look at existing code for patterns
- Open an issue for questions