feat(docs): Update documentation and complete TODO tasks

Replaces INSTALL.md with an updated README.md reflecting new installation instructions and additional information about features, configuration, and development.

Marks several TODO items as completed, specifically enhancing data security measures, organizing distribution files, and improving mood module statistics and pagination.

These changes align the project documentation with current practices and development progress.
This commit is contained in:
Kumi 2024-11-28 17:41:53 +01:00
parent ed3db9b01d
commit a377722339
Signed by: kumi
GPG key ID: ECBCC9082395383F
3 changed files with 116 additions and 67 deletions

View file

@ -1,58 +0,0 @@
# How to install Kumify on your machine
## Prerequisites
This project was tested with Python 3.8.6 on an Ubuntu Linux host. It should theoretically work on any system capable of running a current Python3 installation.
## Getting started
### Install required Python packages
(NB: You may want to do this in a venv the details on how and why to do this are beyond the scope of this document.)
```pip3 install -r requirements.txt```
### Basic configuration
Any configuration you have to do takes place in a settings.ini file in the project's root directory. Copy the provided settings.dist.ini to settings.ini and make any modifications you may need. The options are documented within that file.
### Prepare database
To set up the database, run the following commands:
```python3 manage.py makemigrations```
```python3 manage.py migrate```
### Creating superuser account
To create an account to login to your Kumify instance, you need to use the following command in the project's root directory:
```python3 manage.py createsuperuser```
You will be asked to provide a user name, email address and password.
### Run server
For your personal purposes, if you are running the application on your personal computer and don't need it to be available from the Internet, you may run the following command:
```python3 manage.py runserver```
The application is then available at [http://localhost:8000/].
If you want to make your Kumify instance available through a network, you will need to set up something like gunicorn and nginx. How this works is beyond the scope of this document. To prepare your static files for this, make sure ```STATIC_ROOT``` is set to the correct location in localsettings.py if you don't use S3, then run:
```python3 manage.py collectstatic```
### Cron job
In order to use scheduled tasks, you need to make sure that the ```/cron/``` endpoint is called at regular intervals. Every five minutes should work fine. Use a command like ```curl http://localhost:8000/cron/```, for example.
### Telegram
To set up the Telegram integration, create a new bot by talking to the @BotFather, then run:
```python3 manage.py telegram```
~~If you wish to receive incoming messages through the Telegram gateway, your server must be reachable from the Internet. Configure a public IP/domain name as well as an HTTPS certificate, then run:~~
~~```python3 manage.py telegramwebhook```~~

112
README.md Normal file
View file

@ -0,0 +1,112 @@
# Kumify
Kumify is a personal management tool designed to track and manage various aspects of your life, including habits, moods, dreams, activities, and more. Built with Django, it offers a modular design, allowing users to manage different modules according to their needs.
## Features
- **Mood Tracking**: Log your mood entries, visualize mood patterns with statistics, and manage activities associated with moods.
- **Dream Journal**: Record your dreams, categorize them with themes, and track lucid or special dreams.
- **Habits Tracking**: Set up habits and monitor them through customizable schedules.
- **Health Tracking**: Manage medications, schedules, and track health parameters.
- **Friends Management**: Basic personal relationship manager to keep track of connections.
- **Environment Tracking**: Analyze CO2 emissions and offset efforts.
- **OpenID Connect Authentication**: Supports authentication with an external OpenID Connect provider.
- **Notification System**: Receive notifications via Telegram or Matrix for different events or reminders.
- **API**: Simple API to extend the application's capabilities.
## Installation
### Prerequisites
- Python 3.11 or higher
- A database server (SQLite is configured by default, can be switched to MariaDB/MySQL)
### Steps
1. **Clone the repository**:
```bash
git clone https://your-repo-url/kumify.git
cd kumify
```
2. **Create a virtual environment and activate it**:
```bash
python3 -m venv venv
source venv/bin/activate
```
3. **Install the required packages**:
```bash
pip install -r requirements.txt
```
4. **Configure the settings**:
- Copy `settings.dist.ini` to `settings.ini` and edit as necessary with your configurations (e.g., database settings).
5. **Prepare the database**:
```bash
python manage.py makemigrations
python manage.py migrate
```
6. **Create a superuser for administrative access**:
```bash
python manage.py createsuperuser
```
7. **Run the development server**:
```bash
python manage.py runserver
```
Access the application at `http://localhost:8000`.
## Configuration
The application uses `settings.ini` to manage configuration parameters like database, debugging, timezone, and other module-specific settings. Ensure to configure storage settings if you're using S3 for file storage or MySQL for the database.
## Modules
Enable or disable different modules in `kumify/settings.py` by modifying the `ENABLED_MODULES` list.
### Available Modules
- `cbt`: Cognitive Behavioral Therapy tools
- `mood`: Mood tracking and statistics
- `habits`: Habits management (WIP)
- `dreams`: Dream journal and analysis
- `health`: Health and medication tracking (WIP)
- `friends`: Relationship management (WIP)
- `environment`: CO2 management and offsetting (WIP)
## Notifications
Kumify supports sending notifications via Telegram and Matrix. Setup requires API keys and configuration details for each platform in the database settings.
## Development
This project includes additional tools and dependencies specified in `requirements-dev.txt` for development purposes, such as code formatters and linters.
### Development Commands
- **Format code with Black**:
```bash
black .
```
- **Lint code with Ruff**:
```bash
ruff check .
```
## Contributing
Contributions are welcome. Feel free to open issues or submit pull requests for bug fixes, feature requests, and enhancements.
## License
Kumify is licensed under the MIT License. See the `LICENSE` file for more details.
## Acknowledgments
Thanks to various open source projects that have contributed to this application, including Django and its ecosystem.

13
TODO.md
View file

@ -2,11 +2,11 @@
## General
- [_] Make extra sure users can't access other users' data
- [x] Make extra sure users can't access other users' data
- [_] User profiles / names / gateway config / time zone settings
- [_] Implement a proper logging system
- [_] Implement a proper API
- [_] Move dist files to separate directories
- [x] Move dist files to separate directories
- [_] Turn this into issues
## cbt module
@ -33,11 +33,6 @@
- [_] Implement basic personal relationship manager
## Frontend
- [_] Fix / improve the existing frontend
- [_] Fix buttons on mobile devices (?)
## environment module
- [_] CO2 accounting
@ -45,6 +40,6 @@
## mood module
- [_] Revisit statistics / graphs
- [x] Revisit statistics / graphs
- [_] Make statistics work properly on mobile devices
- [_] Better pagination
- [x] Better pagination