Giter Club home page Giter Club logo

carpanta's People

Contributors

dependabot[bot] avatar jollopre avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

carpanta's Issues

rake deploy::up[filepath] should provision any resource defined

Right now, for simplicity, this rake is only provisioning the following:

We would like to be able to create every resource defined in the JSON file

Configure test environment

A new environment for testing is crucial. That involves:

  • Set a new target into Makefile
  • Create a new docker-compose file
  • Run RSpec for test
  • Clean up db after every test (e.g. database_cleaner)

Seeding db

We would like to have some minimal data that is always loaded. These data will consist of:

  • Tasks from Carpanta hairdresser services
  • A couple of customers to play around

Any time the application is launched for test or development purposes, the seed must happen automatically

Show appointment details from weekly calendar

We need a view to display the details for an appointment.

  • The appointment details is navigated through the weekly calendar
  • It should display id, customer information, offer and duration

Every view has to be responsive

We need to make sure that every view is properly rendered across devices from any form (small, medium, large) and for that we would need to:

  • Replace the tables in favour of resizable components
  • Review margins are respected when page are shrink or expanded
  • etc

Rake Task to generate migration file skeleton

A new rake task named generate:migration is needed in order to reduce the burden of copying/pasting a migration skeleton. This task should:

  • Create a new file under db/migrate
  • Receive an argument 'filename' which will be used to generate a unique file with the format date_filename.rb where date is DateTime.current.strftime('%Y%m%d%H%M%S').

NOTE: The railties gem might help to build this feature (e.g. https://github.com/rails/rails/tree/master/railties)

Views should render any error produced

There are two views that allow users to introduce data through forms, when the request does not produce a successful output, we are returning 422 which is meaningless for the end user.

We would like to render the form again and attach any error as close as possible to its property. If there are errors concerning multiple properties, we should display grouped somewhere in the page. The views to be addressed are those served through the following endpoints:

  • post '/customers'
  • post '/customers/:customer_id/appointments'

Weekly appointments calendar

We need to implement a weekly calendar for appointments, starting at 06:00 and finishing 22:00. The calendar should have the following functionalities:

  • Cursor to move back and forth between weeks
  • The calendar is first rendered with the current week
  • Possibility to create a new appointment by tapping/clicking in a 30 min slot within the calendar.
  • New appointment overlay should have a typeahead to choose the customer, dropdown to select the offer, dropdown to choose the duration (30/60/90/120 min).
  • There cannot exist overlapping appointments for a given date/time

Separate Domain from Application and Infrastructure layers

We would like to introduce the practices from DDD (Domain Driven Design) to drive Carpanta application. For that, we need to make sure that all the domain class/modules are isolated from boundaries such as Application (e.g. Sinatra) and Infrastructure.

Create/List Customer(s)

We need an interface that permits creating customers by introducing:

  • name
  • surname
  • email (required)
  • phone

as well as listing every customer in the system

Automatise deployment

We would like to have an automatic deploy for carpanta. For that will be needed:

  • A mechanism to push docker image to docker hub
  • Tooling for deploying images from docker hub into amazon ECS (e.g. Fargate)
  • Production seeds with strictly necessary entities populated, i.e. just Offers
  • Logging to STDOUT instead of file
  • Considering volume for persisting database across deployments

Format price for session

The price for a session is stored in cents, however we would like to present the price with the adequate currency format. For that, we would need to:

  • Format the price for the list of sessions for a client
  • Format the input for price when a new session wants to be created

Session new form should populate price from task

When a session form is presented, the UI should set the price based on the task selected.

DoD

  • on task selection change, the price field must be updated
  • the price field is editable
  • a price edited is reset to default task price when task selection changes

Update README

Update README file to reflect the current status of the project

Obtain public IP behind running task of Fargate cluster

When we deploy into Aws carpanta. We create the following resources:

  • cluster
  • task definition
  • service

In order to retrieve the public IP behind the task running in the cluster, we have to perform 3 requests (in strict order):

  1. Lists the tasks running in the cluster (e.g. aws-cli ecs list-tasks --cluster <cluster_arn>)
  2. Describe a task from a cluster (e.g. aws-cli ecs describe-tasks --cluster --cluster <cluster_arn> --tasks <task_arn>). This permits obtaining the ENI (Elastic Network Interface) id.
  3. Retrieve details of an ENI (e.g. aws-cli ec2 describe-network-interfaces --network-interface-ids <eni_id>). This contains the public IP behind the Elastic Network interface attached to the running task.

Once we have obtained the Public IP, we should log into the output the IP in order to reduce the necessity of going to the AWS panel.

Remove hardcoded properties within infra/production.json

There are three properties that are hardcoded in infra/production.json which prevents any other usage apart from my AWS user account. The properties are:

We would to replace these hardcoded values with environment variables instead.

Create Customers

We would like to be able to create customers. A customer should have the following info:

  • First Name
  • Surname
  • Email
  • Phone number

The email is the only required info and it must be unique across all the customers stored.

Wrap Aws::ECS::Client into a result monad

Deploy gem uses monads as an alternative to control flow of the program. Right now, if an exception occurs while executing methods from Aws::ECS::Client, we don't wrap it up with a result monad. This means, the program execution halts if any exception is raised.

We would like to control any exception raised within the client, an result result monad instead.

Create appointment within weekly calendar

We need to offer the functionality of creating an appointment within a weekly calendar.

  • Tapping/clicking on a calendar area opens a view where starting_at is already filled and a default of 30 min duration is set.
  • New appointment view should have a typeahead to choose the customer, dropdown to select the offer, dropdown to choose the duration (30/60/90/120 min) and a calendar with date/time.
  • Request test for new appointment
  • Feature or integration test for creating an appointment

Revenue reports

We would like to have a view that displays the gross income for different time scales:

  • weekly revenue (current)
  • monthly revenue (current)
  • yearly revenue (current)

Note, this story does not include getting summary for a particular date inputted

Apply some CSS styling

The views from Carpanta do not have any CSS styling yet. We would like to:

  • use a CSS framework for a quick prototyping
  • make it reusable across the different views

A customer get applied one or more tasks by a hairdresser

A customer attending to a salon wants to receive tasks performed by a hairdresser. We would like to:

  • persist Date/Time for which a task gets applied to a customer (session)
  • persist the price applied for that session (normally copying from the task price)
  • allow repeating a task for a customer on different dates
  • have an interface to select Task, date and price for a session
  • display all the tasks applied for a customer organised in descending order of session date

Apply color scheme to the views

We need to apply a set of color to display the different components allocated through the views. There are at least two colors that have to be present:

  • Black
  • Gold

Charge appointment

We would like to charge for an appointment made. The action will create a payment in the system with the following properties:

  • price (by default the price set under the appointment's offer)
  • payment_method (cash or card)

Adding logs

We would like to have logs in place for:

  • The incoming requests
  • The database activity

Each environment running Carpanta should have a different file under log (e.g. test.log, development.log and production.log)

Integrate deploy gem into travis cicle

Deploy gem is located under infra/deploy and contains a battery of specs that can be executed through make test.

We would like to integrate this command in the current travis configuration set up for the project

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.