Sketchbook is a web application used to help artists manage and share their sketches, and to allow users to search and explore the sketches of others. It is built with an Angular 1 front end and a Rails serialized JSON back end.
You can see a demo version of the application deployed to Heroku here: https://angular-sketchbook.herokuapp.com/
Users can create an account, upload images (sketches), and view the sketches of other artists through searching and filtering based on tags. With Angular, it works as a single page application and communicates with the back end asynchronously.
- Back end dependencies are handled by Bundler and specified in the Gemfile.
- Front end dependencies are handled by Bower and specified in the bower.json file.
- Authentication (user registration and login) is handled by the Rails Devise gem and implemented in Angular with Angular Devise.
- Image uploading is managed by the Rails Paperclip gem, and facilitated in Angular with ng-file-upload. For production, it's configured to use AWS S3 to store images.
- Serialization (responding to requests with data converted to JSON) is handled by Active Model Serializers.
To get it running in development, install dependencies from the Gemfile via Bundler by running
bundle install. Front end dependencies are managed with Bower, but Bower dependencies are checked in to git under
vendor/assets/bower_components. If you want to update them, you can run
Since the application uses PostgreSQL, you need to have it installed locally on your machine with a user that has table creation privileges. You can get further instructions here. If you'd rather not bother with PostgreSQL, you can use an older version of the application that uses SQLite3 here.
Create the database with
bundle exec rails db:create and run migrations with
bundle exec rails db:migrate, then run
bundle exec rails db:seed to populate the database with sample artists and sketches.
Rspec tests are located under the
/spec directory. In order to run tests, run
bundle exec rspec followed by an optional folder or file under the
/spec directory (for example, if you only want to test models, run
bundle exec rspec spec/models).
You can read a blog post going further into the application here.
This project is open source under the terms of the MIT License.