A full-stack TypeScript application for managing students with a React frontend and Node.js backend.
- Add Students: Create new student records with name, CPF, and email
- Edit Students: Update existing student information (name and email)
- Delete Students: Remove students from the system
- View Students: List all registered students in a clean table format
- CPF Validation: Ensures unique CPF numbers and proper formatting
- Email Validation: Validates email format
- Modern UI: Clean, responsive design with gradients and animations
- Real-time Updates: Interface updates immediately after operations
teaching-assistant-react/
├── client/ # React TypeScript frontend
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── StudentForm.tsx
│ │ │ └── StudentList.tsx
│ │ ├── services/ # API service classes
│ │ │ └── StudentService.ts
│ │ ├── types/ # TypeScript type definitions
│ │ │ └── Student.ts
│ │ ├── App.tsx # Main app component
│ │ ├── App.css # Styles
│ │ └── index.tsx # Entry point
│ ├── package.json
│ └── tsconfig.json
├── server/ # Node.js TypeScript backend
│ ├── src/
│ │ ├── models/ # Business logic classes
│ │ │ ├── Student.ts # Student class with validation
│ │ │ └── StudentSet.ts # Student collection management
│ │ └── server.ts # Express server with API routes
│ ├── package.json
│ └── tsconfig.json
└── .vscode/
└── launch.json # VS Code debug configurations
- Node.js 16+ and npm
- VS Code (recommended)
./install-deps.sh-
Install server dependencies:
cd server npm install -
Install client dependencies:
cd client npm install
- Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Type "Tasks: Run Task"
- Select "Install All Dependencies"
- Open the project in VS Code
- Go to Run and Debug (Ctrl+Shift+D)
- Select "Launch Full Stack" from the dropdown
- Press F5 or click the play button
This will start both the server and client simultaneously.
-
Start the server:
cd server npm run devServer runs on http://localhost:3005
-
Start the client (in a new terminal):
cd client npm startClient runs on http://localhost:3004
- Open http://localhost:3004 in your browser
- Use the form at the top to add new students
- Fill in Name, CPF (Brazilian format: 000.000.000-00), and Email
- Click "Add Student" to save
- View all students in the table below
- Use "Edit" to modify student information
- Use "Delete" to remove students (with confirmation)
The server provides a REST API:
GET /api/students- Get all studentsPOST /api/students- Create a new studentGET /api/students/:cpf- Get student by CPFPUT /api/students/:cpf- Update student by CPFDELETE /api/students/:cpf- Delete student by CPF
- Student Class: Handles individual student data with validation
- StudentSet Class: Manages the collection of students with CRUD operations
- Clean Architecture: Separation of concerns between models and API routes
- Type Safety: Full TypeScript implementation
- Error Handling: Proper validation and error responses
- StudentService Class: Centralizes all API communication
- Component Architecture: Reusable React components
- Modern UI: CSS Grid, Flexbox, gradients, and animations
- Form Handling: Real-time CPF formatting and validation
- State Management: React hooks for state management
- Error Handling: User-friendly error messages
- Node.js
- Express.js
- TypeScript
- ts-node-dev (development)
- React 18
- TypeScript
- CSS3 (Grid, Flexbox, Animations)
- Fetch API
- VS Code with debug configurations
- ESLint
- TypeScript compiler
- Hot reloading for both client and server
- Server: http://localhost:3005
- Client: http://localhost:3004
The application uses ports 3005 and 3004 to avoid conflicts with other applications that might be using ports 3000-3003.
ISC