Code Monkey home page Code Monkey logo

blogzy's Introduction

Challenge

The site should consist of a homepage with a paginated list of posts in descending chronological order. Each post should show the title, description, and author, with a link to view the full post.

Creating a post should be a separate page with a simple form. Each post should have a title, description, and body. It should validate that all of these fields are filled out. The post should also have an author, which is automatically assigned as the signed in user. The author of a post should have the ability to edit and delete the post after creation.

You should be required to sign up for an account in order to create a post. For the purposes of this challenge, anyone can create an account and create a post. You can use a plug-and-play solution like devise if you want.

Technical Requirements Met

  • Rails
  • PostgreSQL
  • Use webpack (in React app)
  • Use git
  • CSS framework (bootstrap)
  • Implemented with React front-end
  • Added tests (ruby at least :) )

Installation

This challenge was implemented using Docker for the Rails && PostgreSQL backend plus a React front-end.

Before attempting the installation below be sure that you have upgraded your version of docker-compose and/or Docker Desktop. I built the app using the following version :

docker-compose version 1.28.5, build c4eb3a1f

You may be able to build on other versions of docker but maybe not.

To install the backend, git clone the repo, cd into the repo, and execute the following :

> docker-compose -f docker-compose.yml build
> docker-compose run web rake db:create
> docker-compose run web rake db:migrate
> docker-compose up

optionally run tests

> docker-compose run web rake test:models
> docker-compose run web rake test:controllers

At this point, you should be able to execute

> curl "http://localhost:3001/posts"

and receive a 401 response.

Now install the front-end by cd'ing into the ui folder of the blogzy repo and execute :

> npm install
> npm start

A new browser window shoud open with the Blogzy application running in it, if not open a new tab and go to http://localhost:3000.
The React app uses port 3000 and the rails app uses 3001.

If the dependency gods are smiling on you, you should now have a running Blogzy app. Enjoy!

blogzy's People

Contributors

jkgit avatar

Watchers

James Cloos avatar  avatar

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.