Giter Club home page Giter Club logo

elixir-umbrella-sample-application's Introduction

Sample Application

Requirements

  1. Elixir 1.7.x
  2. PostgreSQL 10.x

Project structure

  • Api (apps/api) - Web API layer
  • Core (apps/core) - data layer

Setup

  1. Configure database credentials:
cp apps/core/config/secret.exs.example apps/core/config/dev.secret.exs
cp apps/core/config/secret.exs.example apps/core/config/test.secret.exs
  1. Setup database:
mix core.setup
  1. Start the server and console
iex -S mix phx.server
  1. Access the API under http://localhost:4000.

elixir-umbrella-sample-application's People

Contributors

smt116 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

elixir-umbrella-sample-application's Issues

Implement events log

Add the mechanism for collecting and reading the following events:

  • "John Doe registered" (user created)
  • "John Doe updated the account" (user updated)
  • "John Doe deleted his account" (user deleted)
  • "John Doe added a new post" (post created)

These are high-level descriptions that could be displayed by the client application. From the internal system, it needs to be possible to see more details about a given event (for example, which fields of the user were updated or what e-mail address has been used to add a new account).

All events need to be persistent. Also, they have to be stored in the separate data store from the main database.


Summary:

  • Use a separate data store for events (it can be any engine - there is no need to worry about the performance)
  • Events need to be persistent
  • Collect events listed at the beginning
  • Expose API for reading events

Add authentication mechanism

Currently, the access is public which means that credentials are not needed to, for example, delete an existing user with all associated posts.

This ticket covers the following subtasks:

  • add sessions controller that allows login and implements "whoami" functionality
  • allow public access only to "get posts" endpoint
  • allow deleting user only by himself
  • allow updating user only by himself
  • deny creating posts that are associated with other users

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.