ядро платформы
Go to file
Stepan Vladovskiy ff3a4debce
All checks were successful
Deploy on push / deploy (push) Successful in 54s
debug(reader.py): trying to handle main topic ids founded
2025-03-27 14:43:17 -03:00
.gitea/workflows debug: fixed workflows gitea 2025-03-05 20:17:34 +00:00
.github/workflows deployfix 2024-11-01 14:33:34 +03:00
alembic merged-hub 2024-11-01 15:06:21 +03:00
auth 0.4.10-a 2025-02-11 12:00:35 +03:00
cache main_topic-fix2 2025-02-12 00:39:25 +03:00
docs corsfix4 2024-12-17 20:06:15 +03:00
orm 0.4.10-a 2025-02-11 12:00:35 +03:00
resolvers debug(reader.py): trying to handle main topic ids founded 2025-03-27 14:43:17 -03:00
schema feat(type.qraphql): SearchResult with shout id 2025-03-27 14:06:52 -03:00
services refactor(search.py): moved to use one table docs for embdings and docs store 2025-03-25 16:42:44 -03:00
tests main_topic-fix 2025-02-12 00:31:18 +03:00
utils main_topic-fix 2025-02-12 00:31:18 +03:00
__init__.py buildsystemver-fix-2 2024-02-19 16:29:05 +03:00
.cursorignore .. 2024-11-14 14:00:33 +03:00
.editorconfig migration, auth, refactoring, formatting 2022-09-17 21:12:14 +03:00
.gitignore feat(search.py): change to txtai server, with ai model. And fix granian workers 2025-03-05 20:08:21 +00:00
.pre-commit-config.yaml ruff-update 2024-06-04 09:10:52 +03:00
app.json 1sec-delay 2024-02-21 23:12:47 +03:00
CHANGELOG.md create-draft-fix 2025-02-27 16:16:41 +03:00
Dockerfile simple-dockerfile 2025-02-10 19:10:13 +03:00
main.py feat: give little timeout for resource stab 2025-03-24 21:42:51 -03:00
nginx.conf.sigil debug: ok, moved map on tgop layaer of nginx. now this version without map 2025-01-29 14:38:33 -03:00
README.md 0.4.9-c 2025-02-10 18:04:08 +03:00
requirements.txt feat: moved txtai and search procedure in different instance 2025-03-12 12:06:09 -03:00
server.py debug(search.py): with more logs when check sync of indexing 2025-03-25 14:44:05 -03:00
settings.py 0.4.10-a 2025-02-11 12:00:35 +03:00

GraphQL API Backend

Backend service providing GraphQL API for content management system with reactions, ratings and comments.

Core Features

Shouts (Posts)

  • CRUD operations via GraphQL mutations
  • Rich filtering and sorting options
  • Support for multiple authors and topics
  • Rating system with likes/dislikes
  • Comments and nested replies
  • Bookmarks and following

Reactions System

  • ReactionKind types: LIKE, DISLIKE, COMMENT
  • Rating calculation for shouts and comments
  • User-specific reaction tracking
  • Reaction stats and aggregations
  • Nested comments support

Authors & Topics

  • Author profiles with stats
  • Topic categorization and hierarchy
  • Following system for authors/topics
  • Activity tracking and stats
  • Community features

Tech Stack

Development

Prepare environment:

mkdir .venv
python3.12 -m venv venv
source venv/bin/activate

Run server

First, certifcates are required to run the server.

mkcert -install
mkcert localhost

Then, run the server:

python server.py dev

Useful Commands

# Linting and import sorting
ruff check . --fix --select I 

# Code formatting
ruff format . --line-length=120 

# Run tests
pytest

# Type checking
mypy .

Code Style

We use:

  • Ruff for linting and import sorting
  • Line length: 120 characters
  • Python type hints
  • Docstrings for public methods

GraphQL Development

Test queries in GraphQL Playground at http://localhost:8000:

# Example query
query GetShout($slug: String) {
  get_shout(slug: $slug) {
    id
    title
    main_author {
      name
    }
  }
}