A full-stack billing application with a React frontend and Go backend.
frontend/
: React TypeScript frontend applicationbackend/
: Go backend API server
To run both the frontend and backend together, use the provided script:
./run-app.sh
This will start the backend server on port 8080 and the frontend application on port 3000.
The backend is a Go application that provides two endpoints:
/ready
: Health check endpoint that always returns 200 OK/billing
: Returns billing data with pagination support
cd backend
./run.sh
Or manually:
cd backend
go run main.go
The server will start on port 8080.
The frontend is a React TypeScript application that displays billing information.
The frontend uses environment variables to configure the API endpoint. Create a .env
file in the frontend directory:
REACT_APP_API_URL=http://localhost:8080
cd frontend
npm install
npm start
The application will start on port 3000.
GET /billing?offset=0&length=10
offset
(optional): The starting index of the data to return (default: 0)length
(optional): The number of items to return (default: 10, max: 50)
{
"orders": [
{
"date": "Jan. 01, 2023",
"type": "Pro Annual"
},
...
],
"total": 100
}