Development environment demo using GitHub Codespaces with Java (Maven) and TypeScript support.
- Click "Code" button on GitHub
- Select "Codespaces" tab
- Click "Create codespace on main"
- Wait for the environment to set up automatically
- Install the Dev Containers extension
- Open this repository in VS Code
- Click "Reopen in Container" when prompted
- Wait for the environment to set up
This devcontainer includes:
- Java 21 (LTS version)
- Maven for dependency management
- Spring Boot sample application
- VS Code Java extensions (Java Pack)
- Node.js (LTS version)
- TypeScript compiler
- Vite for development server
- ESLint and Prettier for code quality
- VS Code TypeScript extensions
- Java Pack (RedHat Java, Java Test Runner, etc.)
- TypeScript and JavaScript support
- ESLint and Prettier
- GitLens
- Live Share
├── .devcontainer/
│ ├── devcontainer.json # Dev container configuration
│ └── post-create.sh # Setup script
├── backend/ # Java Spring Boot application
│ ├── src/main/java/
│ └── pom.xml
├── frontend/ # TypeScript application
│ ├── src/
│ ├── package.json
│ └── vite.config.ts
└── README.md
cd backend
mvn spring-boot:runThe API will be available at http://localhost:8080
cd frontend
npm run devThe frontend will be available at http://localhost:3000
# Install dependencies
mvn dependency:resolve
# Compile
mvn compile
# Run tests
mvn test
# Package
mvn package# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Lint code
npm run lint
# Format code
npm run formatThe devcontainer automatically forwards these ports:
3000- Frontend development server (Vite)8080- Backend API server (Spring Boot)8081- Alternative backend port5173- Alternative Vite port
The sample backend provides:
GET /api/hello- Returns a greeting messageGET /api/health- Health check endpoint
The frontend includes sample code to connect to the backend API. When both services are running, the frontend will automatically check the backend connection and provide a test button.
- Replace the sample Java application with your actual backend code
- Replace the sample TypeScript application with your actual frontend code
- Update dependencies in
pom.xmlandpackage.jsonas needed - Customize the devcontainer configuration if additional tools are required