MCPcopy
hub / github.com/Freedium-cfd/web

github.com/Freedium-cfd/web @main sqlite

repository ↗ · DeepWiki ↗
1,678 symbols 6,003 edges 176 files 186 documented · 11%
README

Freedium: Your paywall breakthrough for Medium!

Become a Patron

Stack:

  • Backend:
  • language: Python 3.9+
  • framework: Unicorn, FastAPI
  • Frontend:
  • framework: Tailwinds CSS v3, Jinja2
  • monitoring: Sentry
  • Database:
  • PostgreSQL, Dragonfly (Redis and Memcached compatible key-value database)
  • Utils:
  • Caddy, Docker, Docker Compose, Cloudflare WARP proxy (wgcf)

Project configuration:

There is three (3) docker-compose profiles:

  • min - without 2 Cluster of Cloudflare WARP proxy, HAProxy proxy balancer, Plausible, Grafana.
  • local - based on min, but with freedium.local exposed hostname, both 80 and 443 ports are exposed, with self-signed TLS certificate.
  • prod - with all services for production.

Requirements:

  • Docker, Docker Compose, last version is preferred.
  • Linux, preferably rolling release. We can't guarantee that Freedium instance will work on other OS. Tested on Ubuntu 22.04 and Fedora 39.
  • git
  • Preferably, fresh and clean brain.

Local run:

To configure your Freedium instance, follow these steps:

  1. Clone the repository:

git clone https://codeberg.org/Freedium-cfd/web/ ./freedium-web --depth 1 cd ./freedium-web

  1. Create and configure the environment file:

cp .env_template .env

Open the .env file and adjust the values as needed for your setup.

  1. Set up the Docker network:

sudo docker network create caddy_net

  1. (Optional) Change your hosts file:

sudo nano /etc/hosts # or vim /etc/hosts # and when you are closed vim, type `:w !sudo tee %` to save file without executing vim in root mode

Add the following line:

127.0.0.1 freedium.local

  1. Start the Freedium services (min profile):

sudo docker compose --profile local -f ./docker-compose/docker-compose.yml up

Stopping the services:

sudo docker compose --profile local -f ./docker-compose/docker-compose.yml down

And now you can access local instance of Freedium by opening browser and type https://freedium.local or http://localhost:6752 if you ignored 4th step. There is would be a warning about insecure connection, because we use self-signed TLS certificate. Ignore it.

Production run:

All production services are running on prod profile. If you use Dockerized reverse proxy, you can specify network caddy_freedium_net with external: true option in networks section of your reverse proxy container. Specify caddy_freedium hostname with port 6752 (or 6753 for Plausible) in your reverse proxy configuration.

As alternative, you can directly change docker-compose configurations to use your reverse proxy. See docker-compose and caddy folders for more details.

Roadmap

  • [ ] Speed up parser logic
  • [ ] Parse articles directly to Markdown
  • [ ] Add more services than just a Medium
  • [ ] Rewrite frontend to Svelte
  • [ ] Integrate Grafana/Prometheus/Plausible to monitor our services
  • [ ] Translate posts to different languages using translatepy library
  • [ ] AI-powered summary of posts

Star History Chart

Extension points exported contracts — how you extend this code

PayButtonProps (Interface)
(no doc)
new-web/src/lib/types/common.ts
ReportProblemProps (Interface)
(no doc)
new-web/src/lib/types/common.ts
ApiError (Interface)
(no doc)
new-web/src/lib/types/common.ts
NavItem (Interface)
(no doc)
new-web/src/lib/types/common.ts
BlogCollection (Interface)
(no doc)
new-web/src/lib/types/blog.ts

Core symbols most depended-on inside this repo

push
called by 234
caddy/static/tailwindcssv3-freedium-hotfix.js
r
called by 220
caddy/static/tailwindcssv3-freedium-hotfix.js
x
called by 186
caddy/static/tailwindcssv3-freedium-hotfix.js
map
called by 150
caddy/static/tailwindcssv3-freedium-hotfix.js
replace
called by 132
caddy/static/tailwindcssv3-freedium-hotfix.js
get
called by 128
caddy/static/tailwindcssv3-freedium-hotfix.js
append
called by 119
caddy/static/tailwindcssv3-freedium-hotfix.js
e
called by 108
caddy/static/tailwindcssv3-freedium-hotfix.js

Shape

Function 787
Method 724
Class 149
Interface 14
Route 4

Languages

Python51%
TypeScript49%
Go1%

Modules by API surface

caddy/static/tailwindcssv3-freedium-hotfix.js774 symbols
database-lib/database_lib/main.py52 symbols
freedium-library/src/freedium_library/services/medium/renderer.py48 symbols
freedium-library/src/freedium_library/services/medium/tests/renderer_test.py40 symbols
freedium-library/src/freedium_library/services/medium/models.py32 symbols
freedium-library/src/freedium_library/utils/http/client/tests/client_test.py29 symbols
rl_string_helper/rl_string_helper/string_helper.py28 symbols
freedium-library/src/freedium_library/utils/json.py28 symbols
freedium-library/src/freedium_library/utils/utils/utf_handler.py24 symbols
freedium-library/src/freedium_library/utils/http/client/httpx.py22 symbols
freedium-library/src/freedium_library/utils/cache/db/mongo.py21 symbols
freedium-library/src/freedium_library/utils/cache/db/base.py20 symbols

Dependencies from manifests, versioned

github.com/Microsoft/go-winiov0.4.14 · 1×
github.com/distribution/referencev0.6.0 · 1×
github.com/docker/dockerv27.2.1+incompatible · 1×
github.com/docker/go-connectionsv0.5.0 · 1×
github.com/docker/go-unitsv0.5.0 · 1×
github.com/felixge/httpsnoopv1.0.4 · 1×
github.com/go-logr/logrv1.4.2 · 1×
github.com/go-logr/stdrv1.2.2 · 1×
github.com/moby/docker-image-specv1.3.1 · 1×
github.com/opencontainers/go-digestv1.0.0 · 1×

Datastores touched

plausible_dbDatabase · 1 repos
postgresDatabase · 1 repos

For agents

$ claude mcp add web \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact