MCPcopy Index your code
hub / github.com/Rust-CMS/radical

github.com/Rust-CMS/radical @v0.1.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.4 ↗ · + Follow
98 symbols 151 edges 23 files 5 documented · 5%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Radical

Index

Project Description

Radical is a CMS heavily inspired by Processwire. This is not a markdown site generator like other CMSs. If you would like something of that nature, see here.

Server Installation

If you have docker, all you need to do is run this docker-compose.

Sub $2/month GCP Cloud Run tutorial coming soon!

Project State

Version: v0.1.4

Ready
Backend
Frontend
Production -

Note on testing

Whenever you run the tests, it is best to have a clean database.

You MUST run it using this command (since mocking for Diesel isn't mature yet):

cargo test -- --test-thread=1

Dev Environment Setup

Required items: * Rustc * MySQL (8.0+ preferred) * Diesel CLI (cargo install diesel_cli --no-default-features --features mysql)

  1. Clone this repository.

git clone git@github.com:Rust-CMS/radical.git

Then, enter the repository.

cd rust-cms

  1. Create a MySQL database.

Log in to your MySQL server, and CREATE DATABASE rustcms;

  1. Add a user to this database and give them privileges.

Change anything labelled rustcms, as it is a placeholder. Since this is a dev environment, you shouldn't have to worry about security too much though.

CREATE USER 'rustcms'@'%' IDENTIFIED BY 'rustcms';

Giving them privileges:

GRANT ALL PRIVILEGES ON rustcms.* TO 'rustcms'@'%';

FLUSH PRIVILEGES

  1. Setup environment variables.

Since this is a development environment, we won't be explicitly setting these on the system. Instead, we'll store them in a file named .env in the root of this project.

First, create a file named .env.

Next, put in your MySQL connection string. Extensive examples for a full .env can be seen here.

The MySQL connection string is not used for the program connecting to the database, but rather for running the migrations. This is usually not required to be done manually.

DATABASE_URL=mysql://rustcms:rustcms@localhost:3306/rustcms

  1. Run Diesel migrations.

First, install Diesel.

cargo install diesel_cli --no-default-features --features mysql

Next, run the migrations.

diesel migration run

Environment Variables

Most all environment setup will be handled by an installer GUI in the future.

app_mysql_username=String
app_mysql_password=String
app_mysql_database=String
app_bind_address=String
app_bind_port=Number
# Max request per IP per minute. Recommended 100 for 512mb 1vCPU
app_max_req=Number

app_mysql_url?=String
app_mysql_port?=Number

# OR for places like GCP Cloud Run. Do not mix, it will not work.
# Note the lack of the APP_ prefix.
MYSQL_UNIX_PORT?=String

Notes on 404 Pages

404s are handled (currently) by creating a file called 404.html. It will automatically be added as your 404 page.

Repositories Like This

Markdown static site generators:

(Data retrieved from here)

https://github.com/getzola/zola

https://github.com/cobalt-org/cobalt.rs

https://github.com/rust-lang/mdBook

Extension points exported contracts — how you extend this code

Model (Interface)
CRUD implementation. TQueryable: The queryable struct. TMutable: The struct that represents the mutable columns in the t [4 …
src/models/mod.rs
Router (Interface)
(no doc) [2 implementers]
src/routers/mod.rs
Joinable (Interface)
Trait that enforces a Model to be joinable if that is desired. This should use associations rather than Left or Right j
src/models/mod.rs
DTO (Interface)
(no doc)
src/models/mod.rs

Core symbols most depended-on inside this repo

pool_handler
called by 24
src/models/mod.rs
get
called by 10
src/helpers/default.rs
login_res
called by 2
src/controllers/user_controllers.rs
encrypt
called by 2
src/services/auth_service.rs
encrypt_password
called by 2
src/services/auth_service.rs
authenticate
called by 2
src/services/auth_service.rs
format_connection_string
called by 2
src/models/mod.rs
watch
called by 1
src/watch.rs

Shape

Function 40
Method 31
Class 21
Interface 4
Enum 2

Languages

Rust100%

Modules by API surface

src/models/page_models.rs13 symbols
src/models/module_models.rs12 symbols
src/services/auth_service.rs9 symbols
src/models/user_models.rs8 symbols
src/models/mod.rs8 symbols
src/controllers/user_controllers.rs8 symbols
src/controllers/page_controllers.rs8 symbols
src/services/errors_service.rs6 symbols
src/controllers/module_controllers.rs6 symbols
src/helpers/default.rs4 symbols
src/controllers/category_controllers.rs4 symbols
src/routers/user_routers.rs2 symbols

Datastores touched

(mysql)Database · 1 repos

For agents

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

⬇ download graph artifact