janejeon / blink Goto Github PK
View Code? Open in Web Editor NEWModern, lightweight, planet-scale link shortener for teams 🎉
Home Page: https://docs.blink.rest
License: GNU Affero General Public License v3.0
Modern, lightweight, planet-scale link shortener for teams 🎉
Home Page: https://docs.blink.rest
License: GNU Affero General Public License v3.0
Cause honestly "myURL" was a bad name...
We should also test w/ both MySQL and Postgres databases...
Plus I’m also leaning towards yeeting the knex case mapper
https://dev.to/alexandrupero/continuous-delivery-with-github-actions-docker-and-traefik-on-a-virtual-private-server-part-1-3285 (i.e. build & push images to github docker registry)
https://medium.com/swlh/deploying-docker-compose-applications-with-ansible-and-github-actions-7f1740392507
https://stackoverflow.com/questions/42302632/docker-compose-continuous-deployment-setup
We just updated the upstream objection-hashid dependency, meaning we can include EmOjIs as part of the link shortener.
EMOJIS.
To do this, we need to LOCK DOWN the alphabet (because otherwise the hashid
for existing links might break), meaning we can't just "add" emoji support later on. So we'd have to include ALL emojis to support in the JSON schema regex...
/blah and /BlAh should both lead to the same place. While we're at it, should we have this be case-insensitive?
and convert ACL while I'm at it
While /:hash
doesn't work for find-my-way, you can have "default" route handlers... do we want to move to restana (not fastify because they don't believe in monkey patching and won't work with passport)?
Instead of directly setting id
, maybe have hash
setter? But how will this affect the ACL's property-based rules?
Also tangentially related to https://github.com/JaneJeon/myURL/projects/6?
In either case, I want to renter the dashboard pages with React, just so I can try out @casl/react.
Pros | Cons | |
---|---|---|
SPA | Simpler (CRA); detox practice | Testing is hard due to ES6 import; subdomain needed; not sure how auth works; routing |
SSR | integrates with express; Component-based routing; css-in-js | More complexity? |
(and to be able to tie users between GH/GL means I'd need to normalize emails and use that as the sort of primary key)
Right now I’m dockerizing basically everything except the actual node server. With the addition of workers, it would be helpful to dockerize the entire stack so development & testing becomes easier.
However, there are some challenges:
Also of note, this is blocked by #428 since Circle does NOT play nice with docker-compose testing...
And plan ahead for use by both private and public organizations of various sizes.
And really do consider using stock solutions, like keystone or strapi or adminbro.
We need some sort of dashboard to manage links and view stats.
Some candidates/inspirations:
I'm just not sure how to go about this, or which ones to preserve.
For example, /login
might be used internally to redirect people to the login page, etc.
I just noticed that despite caching ~/.npm, CircleCI is still downloading Firefox and Chrome!
- restore_cache:
keys:
- v1-deps-{{ checksum "package-lock.json" }}
- run: npm install
- save_cache:
key: v1-deps-{{ checksum "package-lock.json" }}
paths:
- node_modules
Currently, a few tests are hacky (at best) due to having to worry about global state during tests.
I should "transaction-ify" tests to make sure every test is idempotent.
This should preferably be done with the “production” build (aka static SPA being served from the backend) since I’m pretty sure I fucked up some URL config somewhere
POST /links
GET /links
GET /links/:id
GET /users
GET /users/:id
GET /users/:id/links
No analytics yet. Depends on #31.
And point out the new focus
At the very least, when the express server stops, so should the nextjs server (webpack for dev, not sure for prod)
See knex/knex#2686
Should come after #29
E.g.
id => req.user
and make a node instance listen to the postgres changes. When a user change comes through, bust that cache.This can probably also help with #158, as having a stream of changes makes it easy to save it.
Including existing features
For that sweet, sweet free runner minutes
role-acl works well for simpler stuff, but the need to rely on the clunky $.
syntax for comparing anything and the inflexibility of constructing policies (it ALWAYS has to compare a resource field against a body field) is really shit for larger projects.
Specifically, when you have a link that has randomly generated hash and you want to give it a custom hash, either allow duplicate copies to exist or move the randomly generated one into the custom one
Just look at what bitly/kutt does and copy it I guess
casl packages are annoying AF, the only reason we were using mongoose was to try casl.
This would be the "default" analytics, but it should be pluggable.
Use acl.yml
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.