Coder Social home page Coder Social logo

madprops / curls Goto Github PK

View Code? Open in Web Editor NEW
17.0 1.0 2.0 1.11 MB

Text status hosting to use with your own tools

Home Page: https://curls.merkoba.com

License: GNU Affero General Public License v3.0

Python 5.14% HTML 2.90% JavaScript 89.09% CSS 2.67% Ruby 0.09% Shell 0.11%

curls's Introduction

Curls

(Notice in this demo how each color has their own set of curls)

(Also notice the $ picker to switch between curls you own)


What is this?

This is a text status host.

Users claim a curl and get a key to be able to update it.

For instance https://curls.merkoba.com/funone would return the current text of the funone curl.

The response is always pure text, there is no json or anything.

There is no history, or any other features except hosting the current text.

To view and change a curl there's some html pages available but you are encouraged to use your own tools to view and change.


Change one:

curl -X POST -d "curl=mycurl&key=mykey&text=mytext" https://curls.merkoba.com/change

If the change was successful it will return "ok".


Get current status of one:

curl https://curls.merkoba.com/[curl]

Get data of one or more (json response):

curl -X POST -d "curl=somecurl&curl=othercurl" https://curls.merkoba.com/curls

Intended Use

How I think this can be used is by users sharing their curls to others and then they add them to a program. The program would update every added curl every 5 minutes to check for changes. So a user gets an overview of the status of many people.

The status of the people you choose can serve as calls of action or to know about interesting activities happening in real time.

Yes it's similar to Twitter except there's no history or other kind of privacy invading mechanisms in place. And there's no CORS restrictions, reading and changing the curl status should be as easy as possible, from within any application.

It can also serve for software to point to pieces of dynamic text.


Accounts

There are no accounts. You claim a curl once, you are given the key once.

There are no mechanisms to recover a lost key.


Dashboard

I have my own implementation of a program that uses curls.

It is located at: https://curls.merkoba.com/dashboard

The html template is found here.

The code is found here.

Colors

Each color has their own set of curls. You can use them as profiles.

Picker

When you make a successful change to a curl, the curl is saved to your picker list.

So you can easily switch between them by clicking the $ button.


Installing

Everything happens inside /server

Create a virtual env and install dependencies using requirements.txt

Run init_db.sh to create the sqlite3 database.

Create captcha_key.txt and fill it with a secret key for the captcha.

Development

To run a dev server use venv/bin/python -m flask run --debug

To debug quickly create captcha_cheat.txt and fill it to use as the captcha.

Production

Use gunicorn to run it in production.

Set up a reverse proxy on apache.

Make a systemd service to start gunicorn with a non-root user.

Bundle

The js files in static/dashboard/js get bundled into bundle.js when the server starts.

There is a bundle.py file that can be called directly to force a bundle.


Rate Limiter

There is a rate limiter to limit all API endpoints to x requests per minute.

This depends on redis.


Schema

You can see the current schema here.

It's supposed to remain very simple.

curls's People

Contributors

madprops avatar

Stargazers

Nino Annighoefer avatar Michael S. Manley avatar Kai avatar  avatar Werner Smit avatar Tomer Shvueli avatar  avatar dai avatar Viet Cuong Phan avatar Samantha Barron avatar Khurram Virani avatar Guilherme avatar ፍፁም avatar codetrotter avatar Umar Hansa avatar Bryce Torcello avatar Nico Baier avatar

Watchers

 avatar

Forkers

jonchurch cxz

curls's Issues

Is `curls.website` meant to be registered?

The readme uses curls.website for many examples, but this domain has yet to be registered.

Notably, it links to curls.website/dashboard as a example of a dashboard implementation the author has created.

I have my own implementation of a program that uses curls.

It is located at https://curls.website/dashboard.

This goes nowhere, but curls.merkoba.com/dashboard does indeed have a dashboard implementation.

The docs related examples make sense to point to an example domain, but the dashboard one is what made me think this was an accident not intentional.

I'll open a PR to update the readme with the assumption it was an accident.

Close em if not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.