Bird Nerds is a hobby web app that allows users to post about birds they have seen at their local bird feeder. Bird sightings that have been posted store the birds so that they may be found in a search by zipcode. Users can look back at their reported sightings by viewing their saved lists.
This project is built using C#/.NET and SQL Server for the back end API, and the Vue.js front end was provided as part of a Tech Elevator alumni project. In general, the front end has been left untouched in style, though minor structural edits may be made to adapt to the format of the back end API. Project partner:
The diagram below describes the database schema.
The following tables describe all available API endpoints. Endpoint URLs were chosen to match Vue front end supplied by Tech Elevator.
HTTP Method | Endpoint URL | Description | Status code | Returned Value |
---|---|---|---|---|
POST | '/register' | Register a new user. | 201 | { "userId", "username", "role" } |
409, 500 | { "message" } | |||
POST | '/login' | Request a JWT for authorization. | 200 | { user: { "userId", "username", "role" }, "token" } |
409, 500 | { "message" } | |||
GET | '/profile' | Request the current user's profile information. | 200 | { "zipcode", "skillLevel", "favoriteBird", "mostCommonBird", "profileActive" } |
404 | { "message" } | |||
POST | '/createProfile' | Create a profile for the current user based on a JSON object in the body. Also reactivates a deleted profile. | 201 | { "zipcode", "skillLevel", "favoriteBird", "mostCommonBird", "profileActive" } |
400 | { "message" } | |||
PUT | '/editProfile' | Updates a profile for the current user based on a JSON object in the body. | 200 | |
400 | { "message" } | |||
DELETE | '/deleteProfile' | Deactivates a profile for the current user. | 204 | |
404 | { "message" } |
HTTP Method | Endpoint URL | Description | Status code | Returned Value |
---|---|---|---|---|
GET | '/lists/{listId} ' |
Request a user owned list of birds with given ID. | 200 | { "listId", "userId", "listName" } |
404 | { "message" } | |||
GET | '/lists' | Request all user owned lists of birds. | [ { "listId", "userId", "listName" }, . . . ] |
|
POST | '/createList' | Create a new list from JSON object. | 201 | |
400 | { "message" } | |||
PUT | '/editList' | Update a list's name with JSON object. | 200 | |
400, 404 | { "message" } | |||
DELETE | '/deleteList/{listId} ' |
Delete a user owned list with a given ID. Also deletes all birds and notes tied to the list. | 204 | |
400 | { "message" } |
HTTP Method | Endpoint URL | Description | Status code | Returned Value |
---|---|---|---|---|
GET | '/birds' | Request an array of all birds available in the database. | 200 | [ { "birdId", "listId", "birdName", "imgUrl", "zipCode" }, . . . ] |
400, 404 | { "message" } | |||
GET | '/lists/{listId} /birds' |
Request an array of all birds from a list with a specific list ID. | 200 | [ { "birdId", "listId", "birdName", "imgUrl", "zipCode" }, . . . ] |
400, 404 | { "message" } | |||
GET | '/birds/{zipCode} ' |
Request an array of all birds seen at a given zipcode. | 200 | [ { "birdId", "listId", "birdName", "imgUrl", "zipCode" }, . . . ] |
400, 404 | { "message" } | |||
GET | '/birds/{id} ' |
Request a bird JSON object with a specific ID. | 200 | { "birdId", "listId", "birdName", "imgUrl", "zipCode" } |
400, 404 | { "message" } | |||
GET | '/randomBird' | Request a random bird. | 200 | { "birdId", "listId", "birdName", "imgUrl", "zipCode" } |
400, 404 | { "message" } | |||
POST | '/birds' | Create a bird from a JSON object. | 201 | |
400 | { "message" } | |||
PUT | '/birds/{id}' | Update a user owned bird to match a JSON object. | 200 | |
400 | { "message" } | |||
DELETE | '/bird/{id}' | Delete a user owned bird from the database with a specific ID. Also deletes all notes tied to the bird. | 204 | |
400 | { "message" } |
HTTP Method | Endpoint URL | Description | Status code | Returned Value |
---|---|---|---|---|
GET | '/bird/{birdId} /notes' |
Request an array of all notes for a bird. | 200 | [ { "noteId", "birdId", "dateSpotted", "numMales", "numFemales", "feederType", "foodBlend", "notes" }, . . . ] |
400, 404 | { "message" } | |||
GET | '/note' | Request a note with a specific ID as a JSON object. | 200 | { "noteId", "birdId", "dateSpotted", "numMales", "numFemales", "feederType", "foodBlend", "notes" } |
400, 404 | { "message" } | |||
POST | '/newNote' | Create a note that matches a JSON object. | 201 | |
400 | { "message" } | |||
PUT | '/editNote' | Update a user owned note to match a JSON object. | 200 | |
400 | { "message" } | |||
DELETE | '/deleteNote/{id} ' |
Delete a user owned note with a specific ID. | 204 | |
400 | { "message" } |
An anonymous user arrives at the landing page as shown below:
The landing page displays a random image of a bird that has been stored in the database.
The user creates their account with the form that appears after selecting the REGISTER button in the navigation bar on the left. This automatically creates an empty profile that the user can customize.
After logging in, the user can navigate to their profile using the new button in the navigation bar.
When profiles are created, a skill level of 'beginner' is automatically assigned. A user can update their favorite bird, their most commonly spotted bird, their zip code, and their skill level at any time.
WIP - this section is currently being constructed.