Git Product home page Git Product logo

assistant-api's Introduction

Artisan Tattoo Assistant - API

travis-status code-climate dependencies

Prerequisites

NodeJS

Artisan Assistant API is an application built in Node JS using the Endpoints framework.

To run this app, please install Node.

Databases

This application is configured to be backed by a PostgreSQL database in production and SQLite in development. To use PostgreSQL locally, you will need to install it.

If you would like to change the database this application uses, update the knexfile. NOTE: You may also need to update the types in the migrations.

Knex CLI

This application uses the Knex command line tool to run migrations and seed the database. You will need to install it globally:

$ npm install knex -g

Up and Running

$ git clone [email protected]:artisan-tattoo/assistant-api.git
$ cd assistant-api
$ npm install
$ npm run db:setup
$ npm start

Navigate to http://localhost:8080.

Scripts

Artisan Assitant API uses npm scripts to automate tasks. The tasks available are:

  • npm start: runs node index, starts a server at localhost:8080
  • npm run db:setup: creates db, runs migrations and seeds
  • npm run db:reset: drops db, then runs db:setup
  • npm run lint: lints the javascript given options determined in .jshintrc

assistant-api's People

Contributors

andrewsardone avatar ashleygwilliams avatar brixtonasias avatar jcaudle avatar maxjacobson avatar narzero avatar steveklabnik avatar thegcat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

assistant-api's Issues

Create appointments

These are just a join between a customer and a artist, with a specific date.

Add Procfile

   No Procfile detected, using the default web server (webrick)

๐Ÿ˜ญ ๐Ÿ˜ฑ

Artists can do too much

They shouldn't be able to make new artists for the shop.

They shouldn't see other artists' customers in their search results.

They shouldn't be able to edit other artist's customers.

They shouldn't see other artists's customers in their listings.

They shouldn't see other artist's show pages.

Authorization

Currently, any customer can be edited by any shop. That's bad.

Artist log in

Artists should be able to log in, not just shops.

Sign up

This should be the last thing that gets implemented. This will also need a payments implementation, for which I'll be using Balanced.

old db -> new db

When we migrate the real app to this code, it'll need to have the data imported from the old app. This will take some schema changes and such.

search

The code from the original app:

 @customers = %w[name phone email credit want notes location].collect do |col|
    Customer.all(:conditions => ["#{col} ILIKE ?","%#{params[:q]}%"])
end.inject([], &:|)

Search customers

Nothing complicated. Original implementation:

    @customers = %w[name phone email credit want notes location].collect do |col|
      Customer.all(:conditions => ["#{col} ILIKE ?","%#{params[:q]}%"])
    end.inject([], &:|)

Postgres supports the ILIKE, but I don't think sqlite does?

RSS/ATOM Feed for Blog posts

Hi Steve, how open are you to PRs, especially to features not related directly to the core app? I'd like to have an RSS or ATOM feed of the blog posts so that I don't need to follow the whole github RSS feed for the whole project and I'd be willing to contribute that.

schema declared but not used

this is the result of some shitty copy pasta from the mozilla publish api implementation in hapi where i implement a base route class, passing the schema to Joi. i need to fix it to work with Endpoints.

discovered by @steveklabnik when he was implementing error flashes on the frontend and saw the errors hit the db.

Post created_at is incorrect

Seems that one of the pitfalls of using the file system approach is that there's no way to store the created_at in a way that's accessible by Rails. I see you used ctime, but that's based off of when the file is written to the filesystem, not it's actual creation date. My assumption is that every time you deploy it will clobber the ctime of the file with the deploy time. (Note this is completely unsubstantiated and a complete guess).

I worry about not having a proper creation time and how that will affect RSS (Spoiler: maybe not at all).

Overall, this is generally a non-issue, but I think it's an interesting situation to think about. One solution I have would be a pattern similar to this:

http://harpjs.com/recipes/wrap-markdown-posts

Couldn't find a direct rails based parallel, but I think the idea would translate. Also, might be a bit heavier than what you want to deal with for solving a bogus created_at :P

EDIT: Had the thought that a lightweight solution would be to put a timestamp in the filename generated by to_s(:number)

irb(main):010:0> Time.now.to_s(:number)
=> "20140618002121"

You could then parse that out via regex or filename.to_s.last(14)

Artists need a password

If they're going to be able to log in, they'll need a password. At first, I will set them for the artists at Artisan.

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.