Skip to content
/ cc-api Public

Link shortening API written in Flask using Florgon Ecosystem (APIs).

License

Notifications You must be signed in to change notification settings

florgon/cc-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐵 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 (stepanzubkov@florgon.com).

Support

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

Contributors 4

  •  
  •  
  •  
  •  

Languages