Giter VIP home page Giter VIP logo

soundforest's People

Contributors

brecht-vde avatar

Watchers

 avatar

soundforest's Issues

API List Playlists

Description

A user should be able to see a list of already exported playlists

Technical Requirements

Prerequisites

  • AZ Table Storage is setup

API Tech

  • Azure Functions (HTTP trigger)

API Specification

Endpoint
/api/playlists

Method
GET

Response Codes

  • 200: query returned results
  • 404: query did not return results
  • 401: authorization header missing or invalid
  • 500: any unexpected server side error

Response format

{
	"total": 3,
	"results": [
		...,
		{
			"identifier": "tt1234567",
			"title": "Some cool movie",
                        "playlistTitle": "Some playlist title",
                        "playlistUri": "http://spotify.com/someplaylist"
		},
		...
	]
}

Example
/api/playlists

Acceptance Criteria

API Exports

Description

A user should be able to a list of exports they've requested

Technical Requirements

Prerequisites

  • AZ Table Storage is provisioned
  • AZ Service Bus is provisioned
  • Spotify API is properly linked via M2M auth

API Tech

  • Azure Functions (HTTP trigger)
  • Azure Functions (Service Bus trigger)

API Specification

Endpoint
/api/exports

Response Codes

  • 200: return results
  • 404: no results found
  • 401: authorization header missing or invalid
  • 500: any unexpected server side error

Response format

{
	"total": 3,
	"results": [
		...,
		{
			"identifier": "tt1234567",
			"title": "Some cool movie",
                        "url": "http://spotify.com/someplaylist",
                        "status": "completed|pending|inprogress|failed",
                        "reason": "Any error or status message"
		},
		...
	]
}

Example
/api/exports

Acceptance Criteria

UX Authentication

Description

A user must be able to login to the web application using their Spotify account.
A user must be able to logout of the web application

Search API Refactoring v2

  • Spotiwood.Integrations.Omdb project should just return raw response, without mapping yet
  • Dto's should be removed, okay to just map directly to domain classes (in infra project)
  • Used PagedCollection directly

Setup Nginx reverse proxy for API

Description

API project will consist of multiple Azure Functions projects, to mimic the "API Management" feature on Azure, we can use nginx to create a reverse proxy, so all azure functions are externally available through the same address, despite running on different addresses internally.

Acceptance Criteria

All API functions are available through a single address.

Search API Refactoring v1

  • Spotiwood.Api.SearchDetails project should be merged with Spotiwood.Api.Search
  • Spotiwood.Api.SearchDetails.UnitTests project should be merged with Spotiwood.Api.Search.UnitTests

Implement PlaylistExists endpoint

Currently UI project uses a NotFound record to indicate a playlist was not found.
Instead of calling the playlistdetails endpoint and parsing the status code, there should just be a playlistexists endpoint with a valid response structure to indicate if a record exists.

Containerization

Description

Projects should be containerized, to more easily run specific parts or orchestrate the whole thing on a local environment

Acceptance Criteria

Each project can be built as a container or ran via e.g. docker compose

Playlists API Refactoring

  • BaseClient Constructor guards need to be refactored using fixture or other
  • Duplicate mapping should be removed, map directly to domain classes instead (this mapping happens in infra project)
  • Add proper mappers
  • Properly namespace CosmosQueryBuilder etc.

General UI Refactoring

  • Refactor component & page layouts (what's truly reusable and what isn't)
  • Make app mobile friendly
  • Revise messaging events & framework
  • Add state management
  • Make proper api integration client

API JWT Authentication

Description

The API must be protected, so only authorized users can make requests. This should be done via a JWT token in the Authorization header of each request.

Technical Requirements

An Auth0 account must be setup, JWT tokens will be validated against the Auth0 instances.

Acceptance Criteria

When a user makes a request to the API they must:

  • Receive 401 Unauthorized in case the JWT token is invalid or missing
  • Receive a success code response in case the user provided a valid JWT token

API Search Detail

Description

A user should be able to fetch more details of a movie or series via its identifier.

Technical Requirements

Prerequisites

  • OMDb account must be setup
  • OMDb account api key must be protected
  • OMDb should only be used in the back end system

API Tech

  • Azure Functions (HTTP trigger)

API Specification

Endpoint
/api/search/{someid}

Response Codes

  • 200: query returned results
  • 400: invalid query parameters
  • 404: query did not return results
  • 401: authorization header missing or invalid
  • 500: any unexpected server side error

Response format

* = optional field

{
	"identifier": "tt1234567",
	"type": "movie|series",
	"title": "Some movie or series",
	"plot*": "Some movie or series plot",
	"poster*": "Image which belongs to a movie or series",
	"seasons*": 7,
	"year": 2010,
	"endYear*": 2020,
	"actors*": ["name1", "name2", "name3"],
	"genres*": ["name1", "name2", "name3"]
}

Example
/api/search/{identifier}

Acceptance Criteria

UX Playlists

Description

A user should be able to see a list of all exported playlists that are available

UX Exports

Description

  • A user should be able to see for which titles they requested a playlist
  • A user should be able to see the status of the export job

API Search & Detail Cache

Description

OMDb API is limited to 1000 requests per day, to decrease amount of calls, the requests to the search & details API should be cached.

Technical Requirements

  • Memory cache should be added

Acceptance Criteria

  • Search & details are cached in memory

General Refactoring

  • Move messages to constants class or resource
  • Add unit tests for DI for pipeline behaviors
  • Refactor serialization (setting default export settings)
  • Change status from string to enum

API Full Text Search

Description

A user should be able to search a movie or series via some key words and browse the results (if any).

Technical Requirements

Prerequisites

  • OMDb account must be setup
  • OMDb account api key must be protected
  • OMDb should only be used in the back end system

API Tech

  • Azure Functions (HTTP trigger)

API Specification

Endpoint
/api/search

Query parameters
q

Response Codes

  • 200: query returned results
  • 400: invalid query parameters
  • 404: query did not return results
  • 401: authorization header missing or invalid
  • 500: any unexpected server side error

Response format

{
	"total": 3,
	"results": [
		...,
		{
			"identifier": "tt1234567",
			"type": "movie|series",
			"title": "Some cool movie"
		},
		...
	]
}

Example
/api/search?q={keywords}

Acceptance Criteria

  • The API endpoint is available and complies with the API specification

API Playlist Detail

Description

A user should be able to see a single exported playlist when a movie/series identifier is requested

Technical Requirements

Prerequisites

  • AZ Table Storage is setup

API Tech

  • Azure Functions (HTTP trigger)

API Specification

Endpoint
/api/playlists/{someid}

Method
GET

Response Codes

  • 200: query returned results
  • 400: invalid request data
  • 404: query did not return results
  • 401: authorization header missing or invalid
  • 500: any unexpected server side error

Response format

{
	"identifier": "tt1234567",
	"title": "Some cool movie",
	"playlistTitle": "Some playlist title",
	"playlistUri": "http://spotify.com/someplaylist"
}

Example
/api/playlists/tt1234567

Acceptance Criteria

Service Exports

Description

When a user requests an export via the API endpoint a job should be scheduled through a message queue.
A service should pick up this job from the queue and asynchronously prepare the playlist.

Technical Requirements

  • AZ Service Bus is provisioned
  • AZ Table Storage is provisioned
  • Spotify API is setup and linked for M2M auth

Acceptance Requirements

  • A playlist job can be executed
  • Happy flow from pending to completed status

UX Search

Description

A user must be able to navigate to a search page, in which they can enter search terms, see an overview of the results and being able to click through to the detail of a search result.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.