Code Monkey home page Code Monkey logo

cc-api's Introduction

🐡 Florgon CC API.

RESTful API for Florgon url shortener && paste manager (Florgon CC API). Integrated with Florgon SSO. 100% free software

I want to test it!

API deployed and used in production here (API endpoint).

You can install Florgon CC CLI (Command line interface) here. It is in beta stage.

Florgon CC web interface is hosted here. I don't recommend use it, because it is in alpha stage and it is nonfree service. Many features may not work.

Features

Url shortener

Create unlimited short urls anonymously or logged in. Every short url will be expired after 2 weeks.

If you are logged in via Florgon SSO, you can delete your url or check statistics about url views. You can also make stats public.

Paste manager

Create unlimited text pastes anonymously or logged in. Every paste also will be expired after 2 weeks. You can also specify programming language of paste and syntax highlighting will be work in all clients.

You can delete paste or check stats as well as short urls.

Run && deploy

Clone this repository, then:

cd cc-api/src
docker-compose up --build

When you do first start you should apply migrations to the DBMS.

docker-compose exec server sh
export FLASK_APP=app/app.py
flask db upgrade

Configuration

Please edit src/.server.env, all configuration are fetched on startup to src/app/config.py.

DB config are stored in src/.database.env.

Docker settings is src/.env.

Deployment

You should configure nginx server to run this api in production. Gunicorn are already configured in Dockerfile.

Documentation

Documentation will be soon...

Technologies

Written mostly in Python 3.10+

Main framework: flask

DBMS: PostgreSQL

API also uses Redis as broker.

API, DB and Redis runs in docker containers, using docker compose.

Other dependencies are stored in requirements.txt.

Tested on...

Docker engine: v20._
Docker compose: v2._
Python: 3.10, 3.11

License

SPDX-License-Identifier: AGPLv3-or-later

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

Contribution

Feel free to contribute to this program. You can send issue, submit a pull request. You can also email me ([email protected]).

Support

If you are from Russia, you can support me by sending some money using this link.

cc-api's People

Contributors

dependabot[bot] avatar kirillzhosul avatar rhythm-08 avatar stepanzubkov avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rhythm-08

cc-api's Issues

Fix typo in license notice in every file

License notice, that placed at start of every file:

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

You should replace "GNU General Public License" in this notice in every file by "GNU Affero General Public License"

404 Handler

Handler for 404 http code returning json response

Create full documentation.

I prefer docs in markdown format, so I want to use it for cc-api docs.

  • Rewrite README
    • Add information about license
    • Add contribution mini-guide
    • Rewrite deploy guide
    • Add logo (optional)
    • Add information about clients (cc-cli, cc-web)
  • Add API docs in docs/ folder
    • Describe all url/ methods
    • Describe all paste/ methods
    • Add examples (curl + maybe python)
    • Describe Url and Paste models.
    • Mini-guide for contributors, that describes code structure and code style

All docs should be initially written in English and later translated to Russian. Maybe other languages, if I find translators.

Change license from MIT to AGPLv3+

AGPLv3+ requires giving a copy of program through network, so I'm planning to implement this API method. /v1/source for example. It will give link to github repo and link to direct downloading of cc-api code archive.

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.