Skip to content

Conversation

thirochas
Copy link
Collaborator

Dependencies

None.

Documentation

  • README.md - Overview of the full-stack coding exercise.
  • SOLUTION.MD - Detailed solution documentation including implementation strategy, trade-offs, and instructions.

Description

This PR implements the back-end service for the Niche.com college review system as part of the full-stack coding exercise.

Key components include:

  • Data Loading: Implemented CSV parsing to load college review data into an in-memory data structure (ReviewsData) for efficient querying.
  • API Endpoints:
  • /autocomplete: Provides college name suggestions based on a query string, supporting prefix matching.
  • /reviews: Retrieves all reviews for a specified college name via query parameter.
  • Architecture: Follows clean architecture with domain models, repository layer for data access, and service layer for business logic.
  • Error Handling: Includes proper HTTP status codes and error messages for invalid requests or missing data.
  • Testing: Added unit tests for the service layer to validate functionality.
    The service starts on port 8080 and serves JSON responses with CORS headers enabled for front-end integration.

Testing Considerations

  • Unit tests are included in review_service_test.go, covering the core service methods with sample data from data/niche_reviews.csv.
  • Test cases include valid college names (e.g., "Harvard University", "Stanford University") and error scenarios (e.g., nonexistent colleges). No QE testing required for this coding exercise submission; add the "NO QA" label.

SQL Migrations

No SQL migrations required. The service uses in-memory data loaded from a CSV file and does not interact with a database.

Deployment

Versioning

Minor bump. This adds new functionality (college review API endpoints) without breaking changes, as it's an initial implementation of the service.

@thirochas thirochas requested a review from andypinz October 3, 2025 10:39
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