gkats / dude-expenses-backend Goto Github PK
View Code? Open in Web Editor NEWAPI server for dude-expenses.com
Home Page: https://www.dude-expenses.com
API server for dude-expenses.com
Home Page: https://www.dude-expenses.com
Create a Postgresql role and database to use for development.
Make sure the app can connect to the database upon initialization.
Add a migration for creating a table to hold expenses.
ID primary key auto incrementing
Price (in cents)
Date
Tag
Notes
It seems that somebody closes the stream handler. Maybe pass a copy to the logger?
Returns all expenses. Accepts a month parameter to filter expenses by date. If no month is given should return the current month.
How to setup config per environment (development and production)
Probably in the request headers. Be able to decode the token and determine the user.
Accepts price, date, tag and notes.
Price must be decimal greater than zero. Date and tag cannot be blank.
If tag does not exist, create one. Notes are optional.
Responds with the validation errors if expense cannot be created.
Tags: can be multiple, need to do OR
Accepts an email and a password. If the email and password combination matches that of an existing user, it should return a success response status.
Every framework has them ๐
We need to be able to do something like:
routes.Handle("/expenses", JsonResponse(CommonHeaders(Logging(Authentication(WithDBAccess(expenses.Index)))))
The API is a bit ugly, but the idea is that each middleware stack should access the response writer and the request and set up things for the next stack, until we reach our final handler in the chain, which could of course set things for an upper level middleware.
For example the logging middleware could gather some info before and after the request is handled, and log in the end (defer).
For authentication and authorization
Database, logging.
It should return an empty array
Create a script that goes through the db/ folder and executes all migrations in series.
Maybe it's worth it to check out existing packages for this.
POST /authentications
. Should accept email and password params.
Check email and password combination and return an authentication token for the user.
Do we want to support authentication expiration?
Add created_at, updated_at timestamp columns. Should default to now().
Investigate possible solutions.
AWS, Heroku, AppEngine, ...
This issue is about creating a user account. The app should accept an email and a password.
Email should be unique. Password should be at least 6 characters.
On success, it should create a new user with the above information. On error, it should return the validation errors.
Encrypt user passwords in the database.
We only need seconds precision.
SET timezone = 'UTC'
Should be the first migration to run, ever.
Time period: From, to
Create a handler for authentication that acts as middleware.
Needs the app Env as input.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.