The Groupie Tracker Search Bar is a Go-based application designed to help users search for various attributes related to artists, bands, and their music. This program allows users to efficiently find information such as artist names, band members, locations, album release dates, and creation dates with real-time typing suggestions.
Groupie Tracker displays detailed information about music artists and their concerts by consuming an API. The search input is handled in a case-insensitive manner, ensuring that users can find results regardless of how they capitalize their queries. The API provides information in four parts:
- Artists - Information about bands and artists, including name, image, activity year, first album, and band members.
- Locations - Details about the upcoming or past concert locations.
- Dates - Concert dates.
- Relations - Links artists, locations, and concert dates.
The application aims to provide rich visualizations of this data using cards, lists, and tables, making it easy for users to explore information interactively.
- Artist Information: Displays artists' details, including band members, start date, and first album.
- Concert Locations & Dates: Shows upcoming and past concert locations and dates.
- Client-Server Interaction: Implements a feature that triggers a server request and updates information dynamically.
- Error Handling: Ensures that the site is robust and handles any potential errors gracefully.
- Mobile-Responsive Design: The layout adjusts to different screen sizes for a better user experience on mobile devices.
- Backend: Go (Golang) for server-side logic and API interaction.
- Frontend: HTML, CSS for building a dynamic and responsive user interface.
- Template Engine: Go's html/template for rendering HTML pages.
- HTTP Server: Go's net/http package to serve pages and handle requests.
- Client-Server Communication: AJAX or Fetch API to communicate between the client and server without reloading the page.
- Unit Testing: Go's testing framework for ensuring code correctness.
- Go 1.20+ installed on your machine.
- Internet connection to fetch the API data.
- Clone the repository:
git clone https://learn.zone01kisumu.ke/git/aadero/groupie-tracker-search-bar- Navigate into the project directory:
cd groupie-tracker-search-bar-
Install dependencies (if any).
-
Run the application:
go run main.go- Open your browser and navigate to http://localhost:8080.
The application interacts with the following parts of the API:
- Endpoint: /api/artists
- Details: Provides artist details like name, members, first album date, and an image.
- Endpoint: /api/locations
- Details: Contains a list of cities where the artist has performed or will perform.
- Endpoint: /api/dates
- Details: Lists the dates of the artist's concerts.
- Endpoint: /api/relations
- Details: Links between artists, locations, and dates.
- 404 Page: A custom "Not Found" page is shown if a user navigates to an unknown URL.
- 500 Internal Server Error: A custom page is displayed when a server-side error occurs.
- Validation: All inputs are validated on the server and client to avoid malformed requests.
Unit tests ensure the correctness of the backend code. Tests are implemented using Go's testing package.
To run the tests:
go test - Advanced Data Visualization: Adding charts to visualize concert dates and locations.
- Search Feature: Implementing a search functionality to quickly find artists or concerts.
- User Authentication: Allowing users to create accounts and follow their favorite artists.