Skip to content

Commit

Permalink
Merge pull request #3 from dwyl/init
Browse files Browse the repository at this point in the history
Inititialize Repo
  • Loading branch information
jackcarlisle authored Mar 30, 2017
2 parents 0cd74a7 + 30c178c commit 9434bbc
Show file tree
Hide file tree
Showing 42 changed files with 1,364 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# App artifacts
/_build
/db
/deps
/*.ez

# Generated on crash by the VM
erl_crash.dump

# Static artifacts
/node_modules

# Since we are building assets from web/static,
# we ignore priv/static. You may want to comment
# this depending on your deployment strategy.
/priv/static/

# The config/prod.secret.exs file by default contains sensitive
# data and you should not commit it into version control.
#
# Alternatively, you may comment the line below and commit the
# secrets file as long as you replace its contents by environment
# variables.
/config/prod.secret.exs
86 changes: 86 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,88 @@
# feedback

An anonymous feedback mechanism guaranteeing anonymity to those providing it.

## _Why_?

We _all_ have things we would _like_ to improve in our lives and work.
But _often_ we do not know how to approach communicating the "issue"
without _offending_ someone.
If we just _ignore_ the issue or
["_bottle it up_"](https://youtu.be/tf92q6Vrj2o)
without saying anything,
the issue _rarely_ just "_goes away_".

We need a _systematic_ way of sharing feedback on _anything_.
So that _anyone_ can describe an issue, capture and address it.


## _What_?

+ Collect ***anonymous*** feedback from _anyone_.
+ Store that feedback in a simple database
+ Act on the feedback and show progress towards _solving_ any issues raised.

> Initially the feedback will only be _internal_ but we need
to _discuss_ the potential for how to make it `public`
please share your thoughts on this: https://github.com/dwyl/feedback/issues/2




## _Who_?

### _Who_ is the feedback app made for?

Initially this app is for our _internal_ purposes.
We @dwyl are doing a _terrible_ job of collecting feedback from
all the team members, clients,
"users" of the apps we build and other stakeholders.

The `feedback` app addresses this challenge.

### _Who_ _might_ the feedback app be useful to in the future?

_Any_ organsiation or individual who needs a _systematic_ way of collecting
both specific/targeted ***and*** _anonymous_ feedback.


## _How_?

To run this app locally, you will need to have some _basic_ Phoenix Knowledge.
We recommend reading: https://github.com/dwyl/learn-phoenix-framework

### Get Started in _2 Minutes_

+ Clone the Git repository: `git clone [email protected]:dwyl/feedback.git && cd feedback`
+ Install dependencies with `mix deps.get && npm install`
+ Create and migrate your database with `mix ecto.create && mix ecto.migrate`
+ Start Phoenix endpoint with `mix phoenix.server`

Now visit [`localhost:4000`](http://localhost:4000) from your web browser.


# Research

see: https://github.com/dwyl/feedback/issues/1

### Existing Feedback Mechanisms/Solutions

+ ***Uservoice***: https://www.uservoice.com is one of the most well-known
product/user feedback platforms, but when we attempt to search their website
for the word "anonymous"
https://www.google.com/webhp?#q=https://www.uservoice.com:+anonymous
we don't see any results in their product.
But there is something on their forum: https://feedback.uservoice.com/forums/1-product-management/suggestions/956361-allow-anonymous-users-to-create-ideas-without-leav
+ Please add other existing providers
and search for if they allow anonymous feedback ...

### Open Source Feedback Systems?

> Are there any _Open Source_ feedback systems we can use and/or learn from.

### Gather Requirements

> Gather requirements from people you know who either work
or _have_ worked somewhere they don't _love_.
What _specifically_ would they like to have in a feedback system?
69 changes: 69 additions & 0 deletions brunch-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
exports.config = {
// See http://brunch.io/#documentation for docs.
files: {
javascripts: {
joinTo: "js/app.js"

// To use a separate vendor.js bundle, specify two files path
// http://brunch.io/docs/config#-files-
// joinTo: {
// "js/app.js": /^(web\/static\/js)/,
// "js/vendor.js": /^(web\/static\/vendor)|(deps)/
// }
//
// To change the order of concatenation of files, explicitly mention here
// order: {
// before: [
// "web/static/vendor/js/jquery-2.1.1.js",
// "web/static/vendor/js/bootstrap.min.js"
// ]
// }
},
stylesheets: {
joinTo: "css/app.css",
order: {
after: ["web/static/css/app.css"] // concat app.css last
}
},
templates: {
joinTo: "js/app.js"
}
},

conventions: {
// This option sets where we should place non-css and non-js assets in.
// By default, we set this to "/web/static/assets". Files in this directory
// will be copied to `paths.public`, which is "priv/static" by default.
assets: /^(web\/static\/assets)/
},

// Phoenix paths configuration
paths: {
// Dependencies and current project directories to watch
watched: [
"web/static",
"test/static"
],

// Where to compile files to
public: "priv/static"
},

// Configure your plugins
plugins: {
babel: {
// Do not use ES6 compiler in vendor code
ignore: [/web\/static\/vendor/]
}
},

modules: {
autoRequire: {
"js/app.js": ["web/static/js/app"]
}
},

npm: {
enabled: true
}
};
27 changes: 27 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config

# General application configuration
config :feedback,
ecto_repos: [Feedback.Repo]

# Configures the endpoint
config :feedback, Feedback.Endpoint,
url: [host: "localhost"],
secret_key_base: "aBi07mDCHwwdqkunV/mx7LlDilXqy7GeZlrXMOm1Qxtdx9e6KfZ2BsF7O+qpZXSs",
render_errors: [view: Feedback.ErrorView, accepts: ~w(html json)],
pubsub: [name: Feedback.PubSub,
adapter: Phoenix.PubSub.PG2]

# Configures Elixir's Logger
config :logger, :console,
format: "$time $metadata[$level] $message\n",
metadata: [:request_id]

# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env}.exs"
43 changes: 43 additions & 0 deletions config/dev.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
use Mix.Config

# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with brunch.io to recompile .js and .css sources.
config :feedback, Feedback.Endpoint,
http: [port: 4000],
debug_errors: true,
code_reloader: true,
check_origin: false,
watchers: [node: ["node_modules/brunch/bin/brunch", "watch", "--stdin",
cd: Path.expand("../", __DIR__)]]


# Watch static and templates for browser reloading.
config :feedback, Feedback.Endpoint,
live_reload: [
patterns: [
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
~r{priv/gettext/.*(po)$},
~r{web/views/.*(ex)$},
~r{web/templates/.*(eex)$}
]
]

# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n"

# Set a higher stacktrace during development. Avoid configuring such
# in production as building large stacktraces may be expensive.
config :phoenix, :stacktrace_depth, 20

# Configure your database
config :feedback, Feedback.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "feedback_dev",
hostname: "localhost",
pool_size: 10
61 changes: 61 additions & 0 deletions config/prod.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
use Mix.Config

# For production, we configure the host to read the PORT
# from the system environment. Therefore, you will need
# to set PORT=80 before running your server.
#
# You should also configure the url host to something
# meaningful, we use this information when generating URLs.
#
# Finally, we also include the path to a manifest
# containing the digested version of static files. This
# manifest is generated by the mix phoenix.digest task
# which you typically run after static files are built.
config :feedback, Feedback.Endpoint,
http: [port: {:system, "PORT"}],
url: [host: "example.com", port: 80],
cache_static_manifest: "priv/static/manifest.json"

# Do not print debug messages in production
config :logger, level: :info

# ## SSL Support
#
# To get SSL working, you will need to add the `https` key
# to the previous section and set your `:url` port to 443:
#
# config :feedback, Feedback.Endpoint,
# ...
# url: [host: "example.com", port: 443],
# https: [port: 443,
# keyfile: System.get_env("SOME_APP_SSL_KEY_PATH"),
# certfile: System.get_env("SOME_APP_SSL_CERT_PATH")]
#
# Where those two env variables return an absolute path to
# the key and cert in disk or a relative path inside priv,
# for example "priv/ssl/server.key".
#
# We also recommend setting `force_ssl`, ensuring no data is
# ever sent via http, always redirecting to https:
#
# config :feedback, Feedback.Endpoint,
# force_ssl: [hsts: true]
#
# Check `Plug.SSL` for all available options in `force_ssl`.

# ## Using releases
#
# If you are doing OTP releases, you need to instruct Phoenix
# to start the server for all endpoints:
#
# config :phoenix, :serve_endpoints, true
#
# Alternatively, you can configure exactly which server to
# start per endpoint:
#
# config :feedback, Feedback.Endpoint, server: true
#

# Finally import the config/prod.secret.exs
# which should be versioned separately.
import_config "prod.secret.exs"
19 changes: 19 additions & 0 deletions config/test.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
use Mix.Config

# We don't run a server during test. If one is required,
# you can enable the server option below.
config :feedback, Feedback.Endpoint,
http: [port: 4001],
server: false

# Print only warnings and errors during test
config :logger, level: :warn

# Configure your database
config :feedback, Feedback.Repo,
adapter: Ecto.Adapters.Postgres,
username: "postgres",
password: "postgres",
database: "feedback_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
31 changes: 31 additions & 0 deletions lib/feedback.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
defmodule Feedback do
use Application

# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec

# Define workers and child supervisors to be supervised
children = [
# Start the Ecto repository
supervisor(Feedback.Repo, []),
# Start the endpoint when the application starts
supervisor(Feedback.Endpoint, []),
# Start your own worker by calling: Feedback.Worker.start_link(arg1, arg2, arg3)
# worker(Feedback.Worker, [arg1, arg2, arg3]),
]

# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: Feedback.Supervisor]
Supervisor.start_link(children, opts)
end

# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
def config_change(changed, _new, removed) do
Feedback.Endpoint.config_change(changed, removed)
:ok
end
end
Loading

0 comments on commit 9434bbc

Please sign in to comment.