Backend

This directory contains the server-side code for the Job Board application.

Structure

  • index.ts - Main entry point for the Hono API server
  • database/ - Database setup and queries
    • migrations.ts - Database schema definitions
    • queries.ts - Database query functions

API Endpoints

Users

  • GET /api/users - Get all users
  • POST /api/users - Create a new user
    • Body: { "username": "string" }

Jobs

  • GET /api/jobs - Get all job listings
  • POST /api/jobs - Create a new job listing
    • Body:
      { "title": "string", "company": "string", "description": "string", "location": "string", "contactEmail": "string", "postedBy": "string" }

Messages

  • GET /api/messages - Get chat messages
    • Query params: limit (optional, default: 50)
  • POST /api/messages - Send a new chat message
    • Body: { "content": "string", "username": "string" }