A simple TypeScript-based web application with a Node.js/Express backend and TypeScript frontend for user registration.
- Backend: Express.js server with TypeScript
- Frontend: TypeScript-based client with form validation
- Form Validation: Client-side validation for name and email
- Responsive Design: Mobile-friendly user interface
- Error Handling: Comprehensive error handling and user feedback
server/
├── src/
│ └── server.ts # Express server
├── client/
│ ├── src/
│ │ └── main.ts # TypeScript frontend code
│ ├── dist/ # Compiled JavaScript
│ ├── index.html # Main HTML file
│ ├── package.json # Client dependencies
│ └── tsconfig.json # Client TypeScript config
├── package.json # Server dependencies
├── tsconfig.json # Server TypeScript config
└── README.md # This file
- Node.js (v14 or higher)
- npm
- Install server dependencies:
npm install- Install client dependencies and build:
npm run build-clientnpm run devThis will build the client and start the server.
npm run build-client
npm run runThe application will be available at http://localhost:3000
Creates a new user with the provided name and email.
Request Body:
{
"name": "John Doe",
"email": "john@example.com"
}Response:
200 OK: User created successfully400 Bad Request: Error processing request
- Form Validation: Real-time validation for name and email fields
- Loading States: Visual feedback during form submission
- Error Handling: User-friendly error messages
- Responsive Design: Works on desktop and mobile devices
- Accessibility: Proper form labels and keyboard navigation
cd client
npm run buildcd client
npm run watchThe server uses ts-node for development, so TypeScript files are compiled on-the-fly.
- Backend: Node.js, Express.js, TypeScript
- Frontend: TypeScript, HTML5, CSS3
- Build Tools: TypeScript Compiler
- HTTP Client: Fetch API
- Fork the repository
- Create a feature branch
- Make your changes
- Build and test the application
- Submit a pull request
ISC