short-d / short Goto Github PK
View Code? Open in Web Editor NEWURL shortening service written in Go and React
Home Page: https://short-d.com
License: MIT License
URL shortening service written in Go and React
Home Page: https://short-d.com
License: MIT License
App behaviors are currently delegated to Home page component. This lead to very messy code that are hard to read, change, or test. Home page component should use Redux to decouple state management away from presentation.
User should be able to edit the short links they created. This involves:
Please create a separate issue for each litem listed here and link them back to this one.
It just very difficult to prevent bugs or outages from happening.
A status service ( https://status.circleci.com, https://www.githubstatus.com/ ) should be created to
This page can be implemented with fake data for now
Currently, all the short links created are private to their authors. We want to encourage people to share some of their short links with others to give back to the community.
To achieve this:
Please create a separate issue for each litem listed here and link them back to this one.
Currently, user cannot not sign out or switch account after he, she or they signed in.
When users visit https://short-d.com/public
, they should see all the public short links This involves:
Please create a separate issue for each litem listed here and link them back to this one.
Currently, there is no log user requests to track service usage statistics.
As a data analyst, I want to log all the url redirect requests, with city code and timestamp, in order to understand which city those redirections are coming from and how many redirection the service has to process every hour.
Currently, the changes will be deployed onto production server after merging pull request to production branch. Ideally, the PR should be deployed to pre-production environment after merging to master branch so that the developer can preview & verify the changes.
It has been two times when I had to recover data from previous manual database backups. This is very unreliable and time consuming.
Currently, there is no standardized way for load balancer to automatically determine the liveness of a service in order to route the traffic to the available server.
Was trying to get the development environment setup to make a contribution, and opened up the app to make a short link. I authenticated with GitHub, defined a link and clicked "Create Short Link". It asked me to authenticate with GitHub again. I peered into the Network tab and noticed the following response from the createUrl
GraphQL path:
auth token is invalid
I tried the same thing in production and noticed that production was getting the same error, so I decided to post this here. Let me know if you want more info, thanks!
Currently, we are using Docker compose file to manage Short production deployment. However, Short replies on Key Generation Service in order to correctly operate. In the future, Short may reply on more microservices. To ease container management and debugging, we are migrating Short production to kubernetes.
The current README did not mention how to properly setup ReCAPTCHA in order for new developers to test their new features locally.
A new developer should be able to setup ReCAPTCHA for local testing with no effort.
Please support async and request cancellation based on the examples provided in the comment.
#238
Is your feature request related to a problem? Please describe.
Many updates are made to Short. Users don't know them.
Describe the solution you'd like
Add updates modal to remind users. Once users closed the modal for this release, it shouldn't automatically popup again. Users should be able to reopen it by clicking on a button in the footer.
Currently, there are only unit tests running on the CI. There is no integration tests covering the GraphQL and RESTful. To avoid breaking critical features in the future, we want to add integration tests to automatically verify those feature are not breaking when merging to master branch.
Integration tests are running for the branches that have pull requests opened for.
Short is now depending on Key Gen service. It will also be depending on auth service, feature toggle service, etc... Kubernetes is here to help manage all those services.
API consumers have to pass authToken and captchaResponse to createURL endpoint. However, createURL only cares who the user is instead of how to identify the user. Add authQuery and authMutation to handle user identification.
Examples:
query {
authQuery(authToken: "token") {
URL(alias: "test1") {
alias
originalURL
expireAt
}
}
}
mutation createURL($url: URLInput!){
authMutation(authToken: "token", captchaResponse: "captchaResponse") {
createURL(url: $url) {
alias
originalURL
expireAt
}
}
}
Currently, users can only sign in through with their Github account. Some of the users may not use Github. Adding Facebook sign in option makes Short more accessible.
After the user clicks the icon of the Chrome Extension
, the extension will grab the URL of the current page and redirect the user to the app’s home page with &long_link=http://the_current_page_url
appended in the URL. The page automatically fill in the URL of the current page, and move the cursor to the alias text field, waiting for the user to create a the short link.
The page automatically fill in the URL of the current page if the URL has &long_link=http://the_current_page_url
appended. It then move the cursor to the alias text field, waiting for the user to create a the short link.
Is your feature request related to a problem? Please describe.
Kubernetes pods enter crash loop without alert .
Describe the solution you'd like
Configure Prometheus Monitoring & Alert manager to send notifications to devops Slack channel when service crashes.
What is the problem?
Currently, developers don't have their own sandboxed environment to verify their feature is working properly with the underlying infrastructure.
Your solution
Configure testing environment and automatically deploy PR branch ending with *-testing
. Delete the environment when the branch is deleted.
Alternatives considered
Launch Kubernete cluster on local machine. This involves extensive configurations and complex setup. It's forces each new team members to spend weeks to months to learn Kubernetes in order to configure their local environment.
What is the problem?
Constructor is put at bottom of code which makes it hard to find for developers.
Your solution
Put constructor close to struct definition.
Alternatives considered
Leave constructor as it is, because it's less likely to be changed.
From the README:
Start server
docker-compose up
When I want to build the container using docker-compose up
. It returns this following error
WARNING: The DOCKERHUB_USERNAME variable is not set. Defaulting to a blank string.
Pulling app (/short:)...
ERROR: invalid reference format
So I ended up added DOCKERHUB_USERNAME
variable explicitly when running docker-compose up
and it sucessfully builds, for instance
DOCKERHUB_USERNAME=byliuyang docker-compose up
Is this intended?
Currently, code coverage is only 55%. We want to add more unit tests to the backend APIs to improve developer confidence. Refactor may be needed to improve the testability of the code. Let's do it incrementally.
Increase code coverage for app/usecase/url
package to 100%.
User should be able to search the public and the private short links they created. This involves
Please create a separate issue for each litem listed here and link them back to this one.
Feature toggle allows us to:
I found out that one can use either image from the hub or pre-build frontend application locally to pack it to docker.
That means that you have to have yarn installed locally if you make changes to the frontend.
There is a similar problem with backend. Distribution can carry only binary (which will make it much more lightweight) instead of carrying the whole golang sdk.
I would suggest enabling frontend build with docker multi-stage build for frontend (and possibly for backend). I'm working on PR for that.
Depends on #235. Update the short link creation API to add a new argument which will be used to indicate whether the short link created is public or not.
From #237
The current README did not mention how to properly setup Github OAuth in order for new developers to test their new features locally.
A new developer should be able to setup Github OAuth for local testing with no effort.
Depends on #235. Add a toggle, possibly below the short link text fields, that allows a user to specify whether they would like the short link to be public or private upon creation. By default, it will be set on private.
Code is not documented at all, so that should be fixed.
Criteria of success: golint=100%
The alias
column in the url
table should have the type CHARACTER VARYING(50)
like the alias
foreign key columns in user_url_relation
and public_url
tables.
Currently, we are manual logging into the server to manage Short's database. This is very inconvenient.
Let's create a admin dashboard so that we can:
This involves:
Bonus features:
From #237
Depends on #235. This attribute can be added as a new column to the url
table. By default, short links will be private, so this will be set to false by default. This column should also be non-nullable, as we only expect two states (either it's public or it isn't).
Currently, users can only sign in through with their Github account. Some of the users may not use Github. Adding Google sign in option makes Short more accessible.
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.