Skip to content

cfms-dev/cfms_on_websocket

Repository files navigation

CFMS on WebSocket

CFMS (Confidential File Management System), is a complete solution for managing confidential documents. This is the repository used to implement server functionality.

The Project is still in the early stages of development and cannot guarantee the security and stability of running the Service.

Welcome to Github Issues for improvements and bug reports.

You can access the Chinese Simplified version of the development documentation here: CFMS Server Documentation However, Since this document was written specifically for the previous version of CFMS, much of it may be outdated. If possible, use code comments as the primary reference.

Quick Setup

# Clone repo
git clone https://github.com/cfms-dev/cfms_on_websocket.git

# Enter working dir
cd cfms_on_websocket/src

# Setup submodules
git submodule init
git submodule update --depth=1

# Setup dependencies
uv sync --upgrade

# Activate virtual environment
source .venv/bin/activate

Run

python main.py # DO NOT use `-O`!

Database Migrations

The structure of the database varies between different server versions. In order to allow server operators to upgrade to latest versions easily, here, we use Alembic to handle database migrations.

Note:

  1. Remember to backup your databases in advance to avoid data losses.

  2. Configs and generated revisions in /src/include/alembic/versions/ of Alembic is designed for sqlite databases, and we don't guarantee that other types of databases can be successfully upgraded via these revisions.

If you have not used Alembic yet, please run the command below before you checkout new changes:

alembic stamp head

Then checkout the server version you wanted and run:

alembic upgrade head 

Development

Consider using pre-commit to provide an automated code standardization experience.

# Install development dependencies
uv sync --dev

# Install pre-commit hooks
uv run pre-commit install

Testing

This repository includes an automated test suite built with pytest. Note that you should finish the installation before running tests.

To run the tests:

# Install dependencies
uv sync --dev

# Run all tests
uv run pytest

# Run specific test files
uv run pytest tests/test_basic.py

For more information about the test suite, see tests/README.md.

Security

We do our utmost to prevent and resolve security issues within our capabilities. If you discover any existing vulnerabilities, you are welcome to submit a report to us.

Contributing

This is a project that is under active development and we are looking for people interested in the project to participate in testing. We are well aware that the system still has huge shortcomings as a functional solution – and we want as many people as possible to join in improving them.

About

A server-side implementation of a complete system designed for managing confidential documents, called Confidential File Management System (CFMS), running on the WebSocket protocol.

Topics

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors