Code Monkey home page Code Monkey logo

active-businesses-locations's Introduction

active-businesses-locations's People

Contributors

laurabeatris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

active-businesses-locations's Issues

Add oldest business component

Describe the feature request

Add the component to show the oldest business

Describe the solution you'd like

The component should show the oldest business and also fetch it

image

Tasks

  • Add hook to fetch oldest business
  • Add component

Backend: Set up architecture and initial structure

Describe the feature request

Set up the architecture and initial structure of the API.

The architecture is going to be based on DDD and the development process is going to be based on TDD.

Describe the solution you'd like

As DDD is going to be applied, the domain layers should be configured, refer to the following structure:

  • domain
    • infra
    • interfaces
    • services
      • tests
      • service
    • dtos

Must follow the principles of SOLID and configure a container for dependencies.

Tasks

  • Set up structure with Express as the Web Framework.
  • Configure code styles tools such as Editor Config and Eslint.
  • Configure husky and lint-staged to run scripts based on git hooks.
  • Add base folders with .gitkeep to be used on the next pull requests.
  • Configure TypeORM and use Mongo as the database.
  • Add README.md with base instructions to run the API.
  • Configure dependencies container

Add businesses domain

Describe the feature request

Add the businesses domain in order to retrieve data about the businesses.

Describe the solution you'd like

The frontend should receive the locations data according to these three filters:
image

A new service should be created for each filter since the logic to parse the data is different.

  • GetOldestBusinessService
  • GetBusinessWithMostLocations

The controllers can be the following:

  • BusinessesController
    • show method receives two types of query params (oldest and most-locations)
    • index method returns all the locations fetched from the data source.

Tasks

  • Create GetOldestBusinessService and add tests
  • Create GetBusinessWithMostLocations and add tests
  • Create GetAllBusinessesService and add tests
  • Create BusinessesController
  • Create BusinessWithMostLocationsController
  • Create OldestBusinessController
  • Create businesses routes

Notes

Return only the first page of businesses

Add businesses list component

Describe the feature request

Add the component to list businesses

image

Describe the solution you'd like

Fetch and show the list of business

Usage:

<BusinessesList />

Tasks

  • Add component
  • Add hook to fetch businesses
  • Show component on the main page

Add business filters component

Describe the feature request

Filters for the businesses list

image

Describe the solution you'd like

A component that has three types of filter:

  • To show all the business -> BusinessFilters.All
  • To show the oldest business -> BusinessFilters.Oldest
  • To show the business with the most locations -> BusinessFilters.MostLocations

Usage:

<BusinessFilters onFilterChange={handleFilterChange} />

Tasks

  • Add component
  • Show on the main page

Add main page

Describe the feature request

Add the main page to show the header, business filter, and businesses list

Describe the solution you'd like

The page should show the businesses according to the filter currently selected

image

image

image

Tasks

  • Add page
  • Show header
  • Show business filter
  • Show businesses according to the selected filter (All, oldest, and with most locations)

Add business with the most locations component

Describe the feature request

Add the component to show the business with the most locations

Describe the solution you'd like

The component should show the business with the most locations and fetch it

Tasks

  • Add hook to fetch the business with the most locations
  • Add component

Add header component

Describe the feature request

A header component to show an introduction message

image

Describe the solution you'd like

A header component with text constants and also extensible via props

Usage:

<Header title="Welcome!" message="Explore the LA businesses" />

Possible implementation:

const Header = ({ title = headerTexts.title, message = headerTexts.message }) => (...);

Tasks

  • Add component
  • Show on the main page

Add user domain

Describe the feature request

Add the user domain in order to retrieve and create the user data

Describe the solution you'd like

The frontend will upload the user avatar and send the username to the backend and we must store this data in order to retrieve on the next accesses.

image
image

The following repositories should be created:

  • UserRepository (Should also create a fake class in order to use for unit tests)

The following service should be created:

  • CreateUserService

The following providers should be created in order to upload photos:

  • StorageProvider

The following controller should be created in order to retrieve the user data:

  • UserController

Tasks

  • Create StorageProvider - For now, it can use the file system.
  • Create User schema
  • Create UserRepository and FakeUserRepository
  • Create CreateUserService and tests
  • Create UserController

Frontend: Setup architecture and initial structure

Describe the feature request

Set up the architecture and initial structure of the frontend.

Describe the solution you'd like

Use Next.js to easily set up a page and fetch data from the API. In order to avoid writing the styles manually with CSS, using a components library like Chakra-UI

Tasks

  • Initialize app with Next.js and TypeScript
  • Configure code styles tools such as Editor Config and Eslint.
  • Configure husky and lint-staged to run scripts based on git hooks.
  • Configure Chakra-UI

Add business component

Describe the feature request

Add the business component

Describe the solution you'd like

Show the business data
image

Handle the case when the component shows a badge
image

image

Usage:

<Business
  badgeText="Some badge text"
  locationsCount={5}
  city="Some city"
  street="Some street"
  zipCode="Some zipcode"
  name="The business name"
/>

Tasks

  • Add component
  • Show on the main page

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.