Java | Spring Boot | TypeScript | JavaScript | NodeJS | NestJS | React | Python | FastAPI
PostgreSQL | MySQL | MongoDB
Kafka | SQS
PySpark | Airflow
OpenSearch | Cloudwatch
AWS | Azure
Astronomy | Star Gazing | Graphic Designing
This is a simple URL shortener in Flask. Shortens URL upto length 512 characters to 6 characters. Made using Flask-SQLAlchemy. This URL shortener will be able to redirect links and keep stats on the number of times each link was visited. Also has HTTP Basic Authentication to view stats. All this data will be stored in a sqlite3 database.
Java | Spring Boot | TypeScript | JavaScript | NodeJS | NestJS | React | Python | FastAPI
PostgreSQL | MySQL | MongoDB
Kafka | SQS
PySpark | Airflow
OpenSearch | Cloudwatch
AWS | Azure
Astronomy | Star Gazing | Graphic Designing
When we put a custom URL that already exists, the web page shows the error message "custom end already exists" but the reset button doesn't work here now.
Current design supports "https://" and "http://". Make changes such that it is compatible to direct addresses such as "192.168.1.1" and other protocols like "ftp://" as well.
If anyone can suggest any other efficient method for unique string generation.
currently the file index.html contains css, html, js all at one place. Separate them into different files to account for future scaling.
In the current design, user input is not filtered. We want to make sure user inserts a URL only.
This is the thread is for general discussion
After user clicks on "Shorten" button on index page, on the next page add another button which allows user to return to index page again in case they need to generate another URL.
We can implement a url shortner based on iteration.
This way we can avoid checking uniqueness for each new url generated.
Currently there's no limit on how long the original URL and custom ending can be. Setting a limit of 512 characters for original URL and 64 characters for custom URL seems good enough right now.
Adding requirements.txt
file will really make it easy to install all requirements instead of downloading all separately.
The interface is updated with an option for providing users personalized links. Update the screenshots in the README.
FileNotFoundError: [Errno 2] Unable to load configuration file (No such file or directory): '/etc/config.json'
Two questions:
In the readme it is not written anywhere where and how to create a config.
Why is the config created in /etc folder and not in the local folder?
Allow users to create custom short url of their choice, instead of randomly generated strings. A URL like: localhost/myportfolio
is descriptive and is likely to generate more clicks. (This issue is not regarding front end, that's a separate one)
Currently the button is called "Short new URL". Change it to "Shorten another URL"
There's error when checking the custom_end input in backend.
This code should give error if custom_end contains characters which are not allowed.
#these two lines are causing error in backend
#purpose of these lines is to check input in custom_end
if((custom_end is not None) and (not re.search(regex, custom_end))):
return "custom_url contains invalid characters", 400
#end input validation
(custom_end is not None)
will be enoughAdd a .gitignore file. But be careful on what you ignore.
Also add error handling to routes
Allow users to sign up and generate multiple URLs and then track them all at a single dashboard. We can use external partners like github, google etc. for OAuth2 authentication.
(Please note that this is a broad feature and will be divided into small parts)
Text field to enable user to put their own personalized URL on index page
(This issue is dependent on #3 )
Update readme with new screenshot of the add link page after generating a URL. This will include a newly added "Shorten new URL" button, which is missing from the current image.
Update README with screenshots of new interface
The current generated short url is just plain text. it would be helpful to user if it's a clickable link
Don't do manually, use CSS.
Currently the test website hosted locally and is only accessible on local system. Make changes to code such that it can be hosted on external service like AWS / Azure / heroku / pythonanywhere etc.
Database model shouldn't handle the url generation part , it would be difficult later on to add other custom logic.
Needs to show stats for each link to their individual links.
Let's say generated url is: localhost/generatedurl
Then if someone types:
localhost/generatedurl-stats
or localhost/generatedurl/stats
It should show some basic stats like how many clicks on this link. It can be further enhanced using external analytics tools such as google analytics to find geographical region, device type and it's OS, time of day etc.
See an example here
(This is a broad feature and will be divided into small parts)
Current design is vulnerable to injection attacks.
(This issue will be further broken down)
This is a thread for suggesting changes to User Interface.
Using bootstrap is a good way of starting it.
This might cause some error with db
Currently uses sqlite. But if it has to scale up, what DBs should be preferred and why?
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.