Skip to content

Lab03: REST API Chat System with HTTP Status Codes - Mashchenko Pavel - #3

Open
PavMash wants to merge 4 commits into
mainfrom
lab03-mashchenko-pavel
Open

Lab03: REST API Chat System with HTTP Status Codes - Mashchenko Pavel#3
PavMash wants to merge 4 commits into
mainfrom
lab03-mashchenko-pavel

Conversation

@PavMash

@PavMash PavMash commented Jul 7, 2025

Copy link
Copy Markdown
Owner

Lab03: REST API Chat System with HTTP Status Codes

Overview:

Implemented backend and frontend for chatting app

What was implemented:

Go backend component:

  • Implemented handlers for REST API endpoints
  • Implemented storage logic for messsages
  • Created model-classes for message, HTTP requests and responses
  • Passed all backend tests

Flutter frontend component:

  • Implemented UI for chatting app
  • Implemented API connector for the app

How to test:

Backend testing

  1. cd labs/lab02/backend
  2. go mod tidy
  3. go test ./...

Frontend testing

  1. cd labs/lab02/frontend
  2. flutter pub get
  3. flutter test

Checklist:

  • All tests pass
  • Code passes linting
  • Both Go and Flutter components work
  • README updated if necessary
  • Follows course coding standards

PavMash added 4 commits July 5, 2025 21:32
- Add models for primary entities (Message, Storage, Handler), HTTP requests and responses
- Add logic for storage operations
- Implement handlers for main HTTP methods
- Add configuration local server
- Pass all unit tests
@github-actions

github-actions Bot commented Jul 7, 2025

Copy link
Copy Markdown

Lab 03 Test Results - REST API Chat System

🎯 Score: 3/6 (50%)

📚 Getting started! Focus on implementing the basic structures first.

📋 Task Completion:

Go Backend Tasks

  • ✅ Message Models & Validation
  • ✅ Memory Storage CRUD
  • ✅ HTTP API Handlers

Flutter Frontend Tasks

  • ❌ API Service Integration
  • ❌ Chat Screen UI
  • ❌ Integration Test

🔧 Component Details:

Backend (Go):

  • Models: Message struct, validation, JSON serialization
  • Storage: In-memory CRUD operations with thread safety
  • Handlers: REST endpoints (GET, POST, PUT, DELETE) + HTTP Cat API

Frontend (Flutter):

  • API Service: HTTP client with error handling and timeouts
  • Chat Screen: Message list, CRUD operations, loading/error states
  • Integration Test: Integration with HTTP Cat API for status visualization

💡 Next Steps:

  • Implement HTTP client methods and error handling
  • Build chat UI with message operations and state management
  • Integrate HTTP Cat API for status code visualization

🐱 HTTP Cat Integration

Make sure to test different status codes: 200 (OK), 404 (Not Found), 418 (I'm a teapot), 500 (Server Error)
Visit http.cat to see all available status cats! 🐱

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant