A geolocation web app with Node.js + TypeScript backend on AWS.
- React frontend with Vite
- Node.js API backend
- AWS CDK infrastructure
- Docker containerization
- Docker and Docker Compose installed
- Node.js 20+ and pnpm (for local development)
-
Build and run the production container:
./docker-build.sh build ./docker-build.sh run
-
Or use docker-compose directly:
docker-compose up -d
-
Access the application:
- Frontend: http://localhost:5173
- API: http://localhost:8787
-
Build and run the development container:
./docker-build.sh build:dev ./docker-build.sh run:dev
-
Access the development environment:
- Frontend: http://localhost:3000
- API: http://localhost:3001
# Build production image
./docker-build.sh build
# Build development image
./docker-build.sh build:dev
# Run production container
./docker-build.sh run
# Run development container
./docker-build.sh run:dev
# Stop containers
./docker-build.sh stop
# View logs
./docker-build.sh logs
# Clean up Docker resources
./docker-build.sh cleanup
# Show help
./docker-build.sh help- Node.js 20+
- pnpm 8+
-
Install dependencies:
pnpm install
-
Start development servers:
pnpm dev
-
Access the application:
- Frontend: http://localhost:5173
- API: http://localhost:8787
where-am-i/
├── packages/
│ ├── web/ # React frontend (Vite)
│ └── api/ # Node.js API backend
├── infra/ # AWS CDK infrastructure
├── Dockerfile # Production Docker image
├── Dockerfile.dev # Development Docker image
├── docker-compose.yml # Docker Compose configuration
└── docker-build.sh # Docker build and run script
pnpm dev- Start development serverspnpm build- Build all packagespnpm start- Start production serverspnpm test- Run testspnpm lint- Run lintingpnpm deploy- Deploy infrastructurepnpm destroy- Destroy infrastructure
- Multi-stage build for optimized image size
- Runs both frontend and API in a single container
- Uses
servefor static file serving - Non-root user for security
- Health checks included
- Source code mounted for hot reloading
- Includes all development dependencies
- Separate ports (3000, 3001) to avoid conflicts
./docker-build.sh build
./docker-build.sh runThe project includes automated GitHub Actions workflows that:
- Build and test Docker containers
- Push to GitHub Container Registry
- Deploy to AWS infrastructure
- Create automatic releases
See GITHUB_ACTIONS_DOCKER.md for detailed setup instructions.
# Build and push to registry
docker build -t your-registry/where-am-i:latest .
docker push your-registry/where-am-i:latest
# Deploy infrastructure
pnpm deploy- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting
- Submit a pull request
[Add your license here]