Giter Club home page Giter Club logo

loopa-news's Introduction

Loopa News - Yet Another URL Sharing App ⚡

Loopa News is an open source social news app (ala Hacker News) built from scratch with Phoenix, Vue, Vue Router and Vuex. Inspired by Microscope, a popular tutorial app developed with Meteor.

Features

Loopa News is basically a realtime URL sharing app that pretends to serve as a mid size example to learn how to build modern reactive SPAs. In this project you will find how to implement important features/services such as:

  • User Accounts (Sign Up, Sign In, Sign Out & Change Password)
  • Authentication with JSON Web Tokens
  • Reactive RESTful APIs [1]
  • Realtime notifications & alerts
  • Comments with Markdown support
  • Edit comments with Markdown preview
  • Pagination & many more...

[1] React to model changes from the controller and broadcast them to all the clients subscribed to a particular Phoenix channel.

Demo

Demo available here.

Demo GIF

Setup

To start this application locally:

  • Make sure you have installed Elixir, Erlang, Phoenix, Node and PostgreSQL
  • Install the Mix dependencies: $ mix deps.get
  • Create, migrate and seed the development database: $ mix ecto.setup
  • Start the Phoenix Server: $ mix phoenix.server or $ iex -S mix phoenix.server
  • Install the NPM packages $ cd client/ && npm install
  • Start the Express development server: $ npm run dev

To build the frontend for production:

  • In the client directory, run $ npm run build (this will execute the build/build.js script and will copy the produced files to the priv/static/js/ and priv/static/css/ directories)

To deploy this application on Heroku:

  • Follow this guide in the Phoenix website.

License

MIT

loopa-news's People

Contributors

angarsk8 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  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

loopa-news's Issues

Update to Phoenix 1.3?

Hi, thank you very much for this very educative example, it is fun to learn from this!

One question: are you planning to update this to Phoenix 1.3?

Thanks for your attention!

Documentation

First, thank you very much for this project! I was wondering if you had any sort of writeup or documentation regarding how you built this project. I was using mix phoenix.new --no-brunch my_project and then vue init webpack my_project but the generated project has some big differences from yours and when I tried to integrate aspects of your project I ran into a lot of errors, including Webpack-related issues.

May i know how you bootstrapped your application in the beginning? Thank you!

discount.sales

acoment.i
had
has.been.disapear.but.with.another.wep
am
aple.to
se
it.hear
if
i
ask.for.help

How does Phoenix serve Vue components?

I understand that when developing we have both the Phoenix server (for the api) and the Express development server running to serve the pages. So while developing router.ex doesn't need to even define a :browser pipeline.

For production, did you just have to deploy the Phoenix server that will serve the built static js and css files in priv/static? What about the Vue templates/the html?

Can I say that in production the Vue instance gets mounted to #app in web/templates/layout/app.html.eex, but in development the Vue instance gets mounted to #app in client/index.html?

Thank you!

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.