Skip to main content

NeuroCad

English | Русский

PyPI version License: MIT Python versions


NeuroCad is a lightweight platform for building websites and web apps on FastAPI. It includes a visual editor, an LLM editor, a modular system, and ready-to-use authentication.

Features

  • 🎨 Visual editor — GrapesJS, drag-and-drop blocks, StyleManager
  • ⚡ LLM editor — edit pages via DeepSeek, chat with history
  • 📦 Modular system — modules defined in app/*.json
  • 🔐 Auth — superadmin, roles, password reset
  • 🖼️ Media library — image upload and storage
  • 🗄️ SQLite out of the box — no setup required

Quick start

pip install neurocad

mkdir my_project && cd my_project
neurocad run

Open http://127.0.0.1:8000 — login admin, password admin.

Installation

Requirements: Python 3.10+, pip.

pip install neurocad

Usage

CLI

neurocad run        # start the server (uvicorn)

neurocad init creates the following structure:

my_project/
├── app/            # modules (JSON page configs)
├── base/           # SQLite database
├── core/           # Core
├── log/            # logs
├── media/          # uploaded files
├── static/         # static files
├── mig/            # migrations
├── .env
└── main.py

As a library

from neurocad import NeuroCad

app = NeuroCad()

Configuration

Create a .env file in your project root:

SQLITE_URL=sqlite+aiosqlite:///base/neurocad.db
SQLITE_URL_SYNC=sqlite:///base/neurocad.db

SECRET_KEY=change-me-in-production
SUPERADMIN_LOGIN=admin
SUPERADMIN_PASSWORD=admin

APP_HOST=127.0.0.1
APP_PORT=8000

# LLM (DeepSeek)
LLM_PROVIDER=deepseek
DEEPSEEK_API_KEY=sk-...
DEEPSEEK_MODEL=deepseek-flash

LLM editor

The ⚡ button in the page toolbar opens the LLM editor:

  • left — page preview;
  • center — current page preview;
  • right — chat with DeepSeek.

Describe what you want to change — the model returns HTML, which is applied to the preview and saved on the server. Chat history is stored per page.

Requires a DeepSeek API key in .env (DEEPSEEK_API_KEY).

Visual editor

The ✏ button opens GrapesJS:

  • block library on the left;
  • canvas in the center;
  • StyleManager on the right.

Changes are saved via /core/engine/lib/word/{id}.

Project structure

neurocad/
├── core/                  # core
│   ├── auth/              # authentication
│   ├── engine/            # engine, modules, editors
│   │   ├── lib/           # base components
│   │   │   ├── base/      # page skeleton
│   │   │   ├── word/      # page content + editors
│   │   │   │   ├── editor/    # GrapesJS
│   │   │   │   └── llm/       # LLM editor
│   │   │   ├── pages/     # article list
│   │   │   └── nav/       # navigation
│   │   └── mod/           # built-in modules (JSON)
│   └── models/            # SQLAlchemy models
├── utils/                 # utilities
│   ├── llm/               # LLM clients (DeepSeek)
│   ├── sqlite.py          # DB connection
│   └── static.py          # static files serving
├── alembic/               # migrations
├── cli.py                 # CLI
└── app.py                 # FastAPI factory

License

MIT. See LICENSE.

Русский

NeuroCad — лёгкая платформа для создания сайтов и веб-приложений на FastAPI. Включает визуальный редактор, LLM-редактор, модульную систему и готовую авторизацию.

Возможности

  • 🎨 Визуальный редактор — GrapesJS, drag-and-drop блоков, StyleManager
  • ⚡ LLM-редактор — правки страниц через DeepSeek, чат с историей
  • 📦 Модульная система — модули описываются в app/*.json
  • 🔐 Авторизация — суперадмин, роли, восстановление пароля
  • 🖼️ Медиатека — загрузка и хранение изображений
  • 🗄️ SQLite из коробки — не требует настройки

Быстрый старт

pip install neurocad

mkdir my_project && cd my_project
neurocad run

Откройте http://127.0.0.1:8000 — логин admin, пароль admin.

Установка

Требования: Python 3.10+, pip.

pip install neurocad

Использование

CLI

neurocad run        # запустить сервер (uvicorn)

neurocad init создаёт структуру:

my_project/
├── app/            # модули (JSON-конфиги страниц)
├── base/           # SQLite БД
├── core/           # для переопределения core
├── log/            # логи
├── media/          # загруженные файлы
├── static/         # статика
├── mig/            # миграции
├── .env
└── main.py

Как библиотека

from neurocad import NeuroCad

app = NeuroCad()

Конфигурация

Создайте .env в корне проекта:

SQLITE_URL=sqlite+aiosqlite:///base/neurocad.db
SQLITE_URL_SYNC=sqlite:///base/neurocad.db

SECRET_KEY=change-me-in-production
SUPERADMIN_LOGIN=admin
SUPERADMIN_PASSWORD=admin

APP_HOST=127.0.0.1
APP_PORT=8000

# LLM (DeepSeek)
LLM_PROVIDER=deepseek
DEEPSEEK_API_KEY=sk-...
DEEPSEEK_MODEL=deepseek-flash

LLM-редактор

Кнопка ⚡ в тулбаре страницы открывает LLM-редактор:

  • слева — превью страницы;
  • в центре — превью текущей страницы;
  • справа — чат с DeepSeek.

Опишите, что нужно изменить — модель вернёт HTML, он применится к превью и сохранится на сервере. История чата сохраняется по каждой странице.

Для работы нужен ключ DeepSeek в .env (DEEPSEEK_API_KEY).

Визуальный редактор

Кнопка ✏ открывает GrapesJS:

  • библиотека блоков слева;
  • canvas в центре;
  • StyleManager справа.

Изменения сохраняются через /core/engine/lib/word/{id}.

Структура проекта

neurocad/
├── core/                  # ядро
│   ├── auth/              # авторизация
│   ├── engine/            # движок, модули, редакторы
│   │   ├── lib/           # базовые компоненты
│   │   │   ├── base/      # каркас страницы
│   │   │   ├── word/      # контент страницы + редакторы
│   │   │   │   ├── editor/    # GrapesJS
│   │   │   │   └── llm/       # LLM-редактор
│   │   │   ├── pages/     # список статей
│   │   │   └── nav/       # навигация
│   │   └── mod/           # встроенные модули (JSON)
│   └── models/            # SQLAlchemy-модели
├── utils/                 # утилиты
│   ├── llm/               # клиенты LLM (DeepSeek)
│   ├── sqlite.py          # подключение к БД
│   └── static.py          # раздача статики
├── alembic/               # миграции
├── cli.py                 # CLI
└── app.py                 # фабрика FastAPI

Лицензия

MIT. См. LICENSE.

Ссылки

Metadata

Release files for neurocad 0.1.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neurocad 0.1.23
File Size Uploaded
neurocad-0.1.23.tar.gz 8.3 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for neurocad 0.1.23
File Interpreter ABI Platform
neurocad-0.1.23-py3-none-any.whl Python 3 none any Details

Total release size: 18.0 MB

Release files / neurocad-0.1.23.tar.gz

Download URL neurocad-0.1.23.tar.gz
Size 8.3 MB
Tags Source
SHA-256 checksum
How to use checksums
dec8cc5a3d3e894419a8174ddbdb98bab846fbf27a21bf2d59f055c258f24743
BLAKE2b-256 checksum
How to use checksums
0b1bf6aed3e94b2ae6b93ed92b6f6e37f8583dc6897bb8dee334b5940137d1a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / neurocad-0.1.23-py3-none-any.whl

Download URL neurocad-0.1.23-py3-none-any.whl
Size 9.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
e4d2b2d8167ac5d20377565ef752d2e3fd709556166200b26a0f57236c3a64df
BLAKE2b-256 checksum
How to use checksums
4d84a4e24ea91d7d09f9273dba7b26068654fc6968e57c73a13844381766559d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

1.0.32

2 release files

1.0.31

2 release files

1.0.30

2 release files

1.0.29

2 release files

1.0.28

2 release files

1.0.27

2 release files

1.0.26

2 release files

1.0.25

2 release files

1.0.24

2 release files

1.0.23

2 release files

1.0.22

2 release files

1.0.21

2 release files

1.0.20

2 release files

1.0.19

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.29

2 release files

0.1.28

2 release files

0.1.27

2 release files

0.1.26

2 release files

0.1.25

2 release files

0.1.24

2 release files

This release

0.1.23 This release

2 release files

0.1.22

2 release files

0.1.21

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page