Try it: https://time-mvp.herokuapp.com
The simplest version possible of Time
written in the least sophisticated language
in the shortest amount of time
to get something working fast
so that I can start testing it on myself
(and other "early adopters")
so that we can iterate on features fast!
AKA "plan to throw one away".
To get something I can start using myself and measure my own usage
while retaining control
of my (personal) data.
(I'm tired of using closed-source time/task trackers
while
we're building the "Real" version of Time!)
The Time application written in JavaScript/Node.js without any "frameworks" or "libraries" just to get something working as fast as possible!
This code is to "scratch my own itch" so please don't "judge" it for "quality"! However it is meant to be "readable" so if there is anything unclear, please feel free to post a question: https://github.com/nelsonic/time-mvp/issues (I don't "byte"! and usually reply within a couple of hours...)
See: Implementation Notes (below)
The code in this project/MVP is meant to be: (in order of priority)
- Functional - it works well enough for me to start using it!
- Human-readable so anyone with basic HTML/JavaScript knowledge can read and understand it.
We are not making any attempt to make the code:
"High Performance", "Scalable" or "Elegant" in any way.
The best way to get started is to run this example locally.
_As always, if you have any questions or get stuck, we are here to help! Open an issue/question: https://github.com/nelsonic/time-mvp/issues
You will need to have two things installed before
trying to run the code:
- Node.js (with NPM)
- PostgreSQL
Please ensure you have PostgreSQL Installed and Running on your local machine before you attempt to run this example. see: https://wiki.postgresql.org/wiki/Detailed_installation_guides
git clone https://github.com/nelsonic/time-mvp.git
cd time-mvp
npm install
Ensure you have the Required Environment Variables:
create an .env
file in root of the project
and add a line for your DATABASE_URL
.
e.g:
export PORT=4000
export DATABASE_URL=postgres://postgres:@localhost/test
export TEMPLATE_DIRECTORY=./server/email_templates
export [email protected]
export AWS_REGION=eu-west-1
export AWS_ACCESS_KEY_ID=YOURKEY
export AWS_SECRET_ACCESS_KEY=YOURSUPERSECRET
The
default
on Mac is: export DATABASE_URL=postgres://postgres:@localhost/test
if you don't already have a database calledtest
on your system,
create it now by running this command in your psql/pgadmin:CREATE DATABASE test;
Most of these environment variables are for sending emails via AWS SES using sendemail if you are only trying this out on your localhost you won't need to set these and the email sending feature will degrade gracefully.
npm test
Note: running npm test
will first execute npm run create
which creates
the necessary Database Tables to run the app. see:
/test/database_setup.sql
npm run faster
Most people are lead to believe that they need to learn/use the latest & greatest framework in order to build anything.
This complete has Exactly Five Dependencies.
see: https://github.com/nelsonic/time-mvp/blob/master/package.json
i.e: No React, Redux, Babel, Webpack, Express/Hapi, etc.
This is not a "coincidence".
It's certainly not because we (reasonably experienced developers)
don't know how to use these frameworks/libraries ...
While we have attempted to make this MVP as simple as possible by not using any server-side or client frameworks, we have opted to use a couple of tools for the following reasons:
- They are in the spirit of MVP (no bloat)
- They are in our chosen "stack" so we will be able to re-use code in the "Real" version of the Time app.
- Most people in our organization are familiar/experienced with these tools so the code in this MVP will be easy to understand.
- We have a "Beginner Level" Tutorial
forEach
one (see links in each sub-section below) so the learning curve is shallower.
Rather than writing a lot of CSS by-hand/from-scratch
we are using the awesome Tachyons
because it's fast/small & functional!
If you have never heard of it and are curious (you should
be!),
see:
github.com/dwyl/learn-tachyons
PostgreSQL is the not the fastest Datastore,
(that would be Redis ...)
However PostgreSQL is the
4th most popular Database
in the world (not that you should base decisions on "Popularity Contests"
but in this case it means that many people will understand the MVP
and can re-use/extend it if they chose to!)
also PostgreSQL is the default
database in Phoenix (Ecto)
so we will be able to re-use the Database (or at least easily migrate)
in the "Real" version of Time.
If you are new to PostgreSQL, please see:
github.com/dwyl/learn-postgresql
The fastest way we know to ship an application
is using Heroku (5 mins).
You can too:
github.com/dwyl/learn-heroku
Q: Why Build a Minimum Viable Product ("MVP") if you know it's not the "Real" thing?
A: If you are unfamiliar with why we build MVPs please read "The Lean Startup".
Q: Why JavaScript?
A: Because for better-or-worse it's the language everyone knows!
(and annyoningly it's what I have the most practice with so can write faster than Elixir/Erlang, for now...).
Q: Why aren't you using any "Frameworks"?
A: I am! Tachyons & Fontawesome! but no JS frameworks/libraries because we don't need them for an MVP!