dct-os 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dct_os-0.1.0/.gitignore +56 -0
- dct_os-0.1.0/CHANGELOG.md +47 -0
- dct_os-0.1.0/CONTRIBUTING.md +20 -0
- dct_os-0.1.0/LICENSE +65 -0
- dct_os-0.1.0/LICENSING.md +37 -0
- dct_os-0.1.0/PKG-INFO +189 -0
- dct_os-0.1.0/README.md +169 -0
- dct_os-0.1.0/dct_os/__init__.py +1 -0
- dct_os-0.1.0/dct_os/__main__.py +3 -0
- dct_os-0.1.0/dct_os/api/__init__.py +28 -0
- dct_os-0.1.0/dct_os/api/cost_codes.py +83 -0
- dct_os-0.1.0/dct_os/api/dockets.py +704 -0
- dct_os-0.1.0/dct_os/api/projects.py +91 -0
- dct_os-0.1.0/dct_os/api/purchase_orders.py +145 -0
- dct_os-0.1.0/dct_os/api/resources.py +102 -0
- dct_os-0.1.0/dct_os/api/work_orders.py +123 -0
- dct_os-0.1.0/dct_os/app.py +206 -0
- dct_os-0.1.0/dct_os/db.py +207 -0
- dct_os-0.1.0/dct_os/migrations/001_initial_schema.py +124 -0
- dct_os-0.1.0/dct_os/migrations/__init__.py +10 -0
- dct_os-0.1.0/dct_os/schema.sql +110 -0
- dct_os-0.1.0/dct_os/seed.sql +314 -0
- dct_os-0.1.0/dct_os/static/css/app.css +1360 -0
- dct_os-0.1.0/dct_os/static/js/app.js +1745 -0
- dct_os-0.1.0/dct_os/templates/base.html +194 -0
- dct_os-0.1.0/dct_os/templates/index.html +1 -0
- dct_os-0.1.0/pyproject.toml +31 -0
- dct_os-0.1.0/tests/__init__.py +0 -0
- dct_os-0.1.0/tests/test_api.py +854 -0
dct_os-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg-info/
|
|
7
|
+
*.egg
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
*.whl
|
|
11
|
+
.eggs/
|
|
12
|
+
.venv/
|
|
13
|
+
venv/
|
|
14
|
+
env/
|
|
15
|
+
|
|
16
|
+
# Node
|
|
17
|
+
node_modules/
|
|
18
|
+
npm-debug.log*
|
|
19
|
+
yarn-debug.log*
|
|
20
|
+
yarn-error.log*
|
|
21
|
+
|
|
22
|
+
# IDEs
|
|
23
|
+
.vscode/
|
|
24
|
+
.idea/
|
|
25
|
+
*.swp
|
|
26
|
+
*.swo
|
|
27
|
+
*~
|
|
28
|
+
.project
|
|
29
|
+
.classpath
|
|
30
|
+
.settings/
|
|
31
|
+
|
|
32
|
+
# OS
|
|
33
|
+
.DS_Store
|
|
34
|
+
Thumbs.db
|
|
35
|
+
Desktop.ini
|
|
36
|
+
|
|
37
|
+
# Environment and secrets
|
|
38
|
+
.env
|
|
39
|
+
.env.*
|
|
40
|
+
*.pem
|
|
41
|
+
*.key
|
|
42
|
+
|
|
43
|
+
# Database
|
|
44
|
+
*.db
|
|
45
|
+
*.db-journal
|
|
46
|
+
*.db-wal
|
|
47
|
+
*.db-shm
|
|
48
|
+
|
|
49
|
+
# Flask instance folder
|
|
50
|
+
instance/
|
|
51
|
+
|
|
52
|
+
# Claude Code
|
|
53
|
+
.claude/
|
|
54
|
+
|
|
55
|
+
# Distribution
|
|
56
|
+
*.spec
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to DCT-OS will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - 2026-05-31
|
|
6
|
+
|
|
7
|
+
Initial public release.
|
|
8
|
+
|
|
9
|
+
### Core Features
|
|
10
|
+
|
|
11
|
+
- **Project management**: Create, edit, archive, and filter projects with client, code, and date tracking
|
|
12
|
+
- **Three-axis cost model**: Work Orders (client scope), Cost Codes (internal budget), Purchase Orders (financial commitment)
|
|
13
|
+
- **WO-CC matrix**: Restrict which cost codes are valid for each work order
|
|
14
|
+
- **PO drawdown**: Track committed spend against purchase order values in real time
|
|
15
|
+
|
|
16
|
+
### Docket Entry
|
|
17
|
+
|
|
18
|
+
- **Header + lines model**: Each docket has a header (date, supplier, docket number, PO) with multiple line items (WO, CC, resource, qty, rate)
|
|
19
|
+
- **Copy docket**: One-click duplication of a previous docket with today's date for recurring plant/labour
|
|
20
|
+
- **PDF/image viewer**: Side-by-side document viewer with folder browse, file dropdown, and prev/next navigation
|
|
21
|
+
- **Source fingerprinting**: SHA-256 hash of source documents stored per docket for duplicate detection
|
|
22
|
+
- **Duplicate warning**: Amber banner when a loaded file's fingerprint matches an existing docket
|
|
23
|
+
- **Resource auto-fill**: Select a resource to auto-populate description, unit, and rate
|
|
24
|
+
- **Cascading dropdowns**: WO selection filters available cost codes per line
|
|
25
|
+
|
|
26
|
+
### Docket Summary Report
|
|
27
|
+
|
|
28
|
+
- **Supplier-based reporting**: Generate summaries by supplier with date range or specific docket selection
|
|
29
|
+
- **Category grouping**: Toggle between categorised view (grouped by resource category with subtotals) and flat resource list
|
|
30
|
+
- **CSV export**: One-click export of summary data
|
|
31
|
+
- **Claim tagging**: Mark dockets as claimed with a reference string (e.g. invoice number) for tracking
|
|
32
|
+
- **Hide claimed filter**: Filter out already-claimed dockets from the picker
|
|
33
|
+
|
|
34
|
+
### Grid & Navigation
|
|
35
|
+
|
|
36
|
+
- **AG-Grid integration**: Sortable, filterable, resizable columns across all entity types
|
|
37
|
+
- **Continuous scroll**: No pagination on docket grid
|
|
38
|
+
- **Claimed status**: Visual indicator (green tint) for claimed dockets in the grid
|
|
39
|
+
- **Sidebar project list**: Searchable with Active/All filter and quick-edit pencil button
|
|
40
|
+
|
|
41
|
+
### Technical
|
|
42
|
+
|
|
43
|
+
- **Flask + SQLite**: Zero-dependency backend, single-file database
|
|
44
|
+
- **Cache busting**: Timestamp-based URL versioning prevents stale browser assets after updates
|
|
45
|
+
- **REST API**: Standard JSON endpoints for all operations
|
|
46
|
+
- **38 automated tests**: Full API test coverage including CRUD, summary, claims, hash checks, and duplicate detection
|
|
47
|
+
- **Demo seed data**: Fictional "Riverbend Shire Council" dataset with 4 projects, 106 dockets, 25 resources
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Contributing to DCT-OS
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing to DCT-OS.
|
|
4
|
+
|
|
5
|
+
## Before You Submit a Pull Request
|
|
6
|
+
|
|
7
|
+
A Contributor Licence Agreement (CLA) is currently being configured via [CLA Assistant](https://cla-assistant.io/). Until the CLA is in place, we cannot merge pull requests.
|
|
8
|
+
|
|
9
|
+
**In the meantime, please open an issue first** to discuss any proposed changes. This ensures your contribution aligns with the project direction and avoids wasted effort.
|
|
10
|
+
|
|
11
|
+
## How to Contribute
|
|
12
|
+
|
|
13
|
+
1. **Open an issue** describing the bug, feature, or improvement you have in mind.
|
|
14
|
+
2. **Discuss** the approach with the maintainers before writing code.
|
|
15
|
+
3. Once the CLA is live, **fork the repo**, make your changes, and submit a pull request.
|
|
16
|
+
4. **Sign the CLA** when prompted on your first PR — it's a one-time process via GitHub OAuth.
|
|
17
|
+
|
|
18
|
+
## Code of Conduct
|
|
19
|
+
|
|
20
|
+
Be respectful, constructive, and professional. We're building tools for engineers — keep the signal-to-noise ratio high.
|
dct_os-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Parameters
|
|
4
|
+
|
|
5
|
+
Licensor: Andy Unger
|
|
6
|
+
Licensed Work: DCT-OS
|
|
7
|
+
The Licensed Work is (c) 2026 Andy Unger.
|
|
8
|
+
Additional Use Grant: You may make production use of the Licensed Work,
|
|
9
|
+
provided such use does not include offering the
|
|
10
|
+
Licensed Work to third parties on a hosted or
|
|
11
|
+
embedded basis to derive revenue from the
|
|
12
|
+
functionality of the Licensed Work.
|
|
13
|
+
Change Date: Four years from the date the Licensed Work is
|
|
14
|
+
published, on a per-release basis.
|
|
15
|
+
Change License: Apache License, Version 2.0
|
|
16
|
+
|
|
17
|
+
For information about alternative licensing arrangements for the Licensed
|
|
18
|
+
Work, please contact: astral2@gmx.de
|
|
19
|
+
|
|
20
|
+
Notice
|
|
21
|
+
|
|
22
|
+
Business Source License 1.1
|
|
23
|
+
|
|
24
|
+
Terms
|
|
25
|
+
|
|
26
|
+
The Licensor hereby grants you the right to copy, modify, create
|
|
27
|
+
derivative works, redistribute, and make non-production use of the
|
|
28
|
+
Licensed Work. The Licensor may make an Additional Use Grant, above,
|
|
29
|
+
permitting limited production use.
|
|
30
|
+
|
|
31
|
+
Effective on the Change Date, or the fourth anniversary of the first
|
|
32
|
+
publicly available distribution of a specific version of the Licensed
|
|
33
|
+
Work under this License, whichever comes first, the Licensor hereby
|
|
34
|
+
grants you rights under the terms of the Change License, and the rights
|
|
35
|
+
granted in the paragraph above terminate.
|
|
36
|
+
|
|
37
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
38
|
+
currently in effect as described in this License, you must purchase a
|
|
39
|
+
commercial license from the Licensor, its affiliated entities, or
|
|
40
|
+
authorized resellers, or you must refrain from using the Licensed Work.
|
|
41
|
+
|
|
42
|
+
All copies of the original and modified Licensed Work, and derivative
|
|
43
|
+
works of the Licensed Work, are subject to this License. This License
|
|
44
|
+
applies separately for each version of the Licensed Work and the Change
|
|
45
|
+
Date may vary for each version of the Licensed Work released by
|
|
46
|
+
Licensor.
|
|
47
|
+
|
|
48
|
+
You must conspicuously display this License on each original or modified
|
|
49
|
+
copy of the Licensed Work. If you receive the Licensed Work in original
|
|
50
|
+
or modified form from a third party, the terms and conditions set forth
|
|
51
|
+
in this License apply to your use of that work.
|
|
52
|
+
|
|
53
|
+
Any use of the Licensed Work in violation of this License will
|
|
54
|
+
automatically terminate your rights under this License for the current
|
|
55
|
+
and all other versions of the Licensed Work.
|
|
56
|
+
|
|
57
|
+
This License does not grant you any right in any trademark or logo of
|
|
58
|
+
Licensor or its affiliates (provided that you may use a trademark or
|
|
59
|
+
logo of Licensor as expressly required by this License).
|
|
60
|
+
|
|
61
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS
|
|
62
|
+
PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES
|
|
63
|
+
AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION)
|
|
64
|
+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
|
|
65
|
+
NON-INFRINGEMENT, AND TITLE.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# DCT-OS Licensing
|
|
2
|
+
|
|
3
|
+
DCT-OS is released under the [Business Source License 1.1](LICENSE). This page explains what that means in plain English.
|
|
4
|
+
|
|
5
|
+
## What's Free
|
|
6
|
+
|
|
7
|
+
| Use Case | Allowed? |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Engineer running it on their laptop for daily cost tracking | Yes — free, always |
|
|
10
|
+
| Small contractor using it internally across their projects | Yes — free, always |
|
|
11
|
+
| Council or organisation adopting it internally | Yes — free, always |
|
|
12
|
+
| Modifying the code to fit your internal workflow | Yes — free, always |
|
|
13
|
+
| Contributing improvements back via pull request | Yes — free, always |
|
|
14
|
+
|
|
15
|
+
No registration, no licence key, no usage limits, no phone-home.
|
|
16
|
+
|
|
17
|
+
## What Needs a Commercial Licence
|
|
18
|
+
|
|
19
|
+
| Use Case | Licence Required? |
|
|
20
|
+
|---|---|
|
|
21
|
+
| Hosting DCT-OS as a SaaS and charging others to use it | Yes — commercial licence required |
|
|
22
|
+
| Bundling DCT-OS into a product you sell | Yes — commercial licence required |
|
|
23
|
+
| Reselling DCT-OS as your own product | Yes — commercial licence required |
|
|
24
|
+
|
|
25
|
+
The line is simple: **if you're deriving revenue from offering DCT-OS functionality to third parties, you need a commercial licence.** Using it internally for your own work is always free.
|
|
26
|
+
|
|
27
|
+
## The Four-Year Conversion
|
|
28
|
+
|
|
29
|
+
Each release of DCT-OS automatically converts to the [Apache Licence 2.0](https://www.apache.org/licenses/LICENSE-2.0) four years after its publication date. Once converted, that version is fully open source with no restrictions beyond the Apache 2.0 terms.
|
|
30
|
+
|
|
31
|
+
New releases start their own four-year clock under the BSL.
|
|
32
|
+
|
|
33
|
+
## Commercial Licensing
|
|
34
|
+
|
|
35
|
+
For commercial licence enquiries, pricing, or questions about whether your use case requires a licence:
|
|
36
|
+
|
|
37
|
+
**astral2@gmx.de**
|
dct_os-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dct-os
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Daily cost tracking for civil engineering
|
|
5
|
+
Project-URL: Homepage, https://github.com/h3ylis/dct-os
|
|
6
|
+
Project-URL: Issues, https://github.com/h3ylis/dct-os/issues
|
|
7
|
+
Author-email: Andy Unger <astral2@gmx.de>
|
|
8
|
+
License-Expression: BUSL-1.1
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: civil-engineering,cost-tracking,project-management
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Office/Business :: Financial :: Accounting
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: flask>=3.0
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# DCT-OS
|
|
22
|
+
|
|
23
|
+
**Daily cost tracking, done right.**
|
|
24
|
+
|
|
25
|
+
DCT-OS is a cost tracking platform built for civil engineering — project managers, site engineers, and contractors who need to track daily costs without fighting enterprise software. SQLite-backed, self-hostable, and ready to deploy.
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- Project and cost code management
|
|
30
|
+
- Daily docket entry with resource rate lookups
|
|
31
|
+
- PDF-assisted manual entry (PDF viewer + form side-by-side)
|
|
32
|
+
- Project summary, cost code breakdown, and supplier spend reports
|
|
33
|
+
- CSV and Excel export
|
|
34
|
+
- REST API for all operations
|
|
35
|
+
- Single binary or `pip install` — runs anywhere
|
|
36
|
+
|
|
37
|
+
## Installation (Windows)
|
|
38
|
+
|
|
39
|
+
You only need to do this once. After that, DCT-OS starts automatically every time you turn on your computer.
|
|
40
|
+
|
|
41
|
+
### Option A: Let Claude do it
|
|
42
|
+
|
|
43
|
+
If you have [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed, open it and paste this:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
Install DCT-OS for me. Run: pip install dct-os, then run: dct-os install.
|
|
47
|
+
If Python isn't installed, download and install it from python.org first
|
|
48
|
+
(make sure "Add Python to PATH" is ticked). After install, run: dct-os
|
|
49
|
+
to start it and open the browser.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Claude will handle the rest. Once it's done, bookmark [http://localhost:5000](http://localhost:5000) and you're set.
|
|
53
|
+
|
|
54
|
+
### Option B: Do it yourself
|
|
55
|
+
|
|
56
|
+
### Step 1: Install Python
|
|
57
|
+
|
|
58
|
+
1. Go to [python.org/downloads](https://www.python.org/downloads/)
|
|
59
|
+
2. Click the big yellow **Download Python** button
|
|
60
|
+
3. Run the installer
|
|
61
|
+
4. **Important:** Tick the box that says **"Add Python to PATH"** at the bottom of the first screen
|
|
62
|
+
5. Click **Install Now** and wait for it to finish
|
|
63
|
+
|
|
64
|
+
### Step 2: Install DCT-OS
|
|
65
|
+
|
|
66
|
+
1. Press the **Windows key**, type `cmd`, and press **Enter** to open a command prompt
|
|
67
|
+
2. Type the following and press **Enter**:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
pip install dct-os
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Wait for it to finish (you'll see some download progress, then it returns to the blinking cursor).
|
|
74
|
+
|
|
75
|
+
3. Type the following and press **Enter**:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
dct-os install
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
You'll see a confirmation message. That's it. You're done with the command prompt and can close it.
|
|
82
|
+
|
|
83
|
+
### Step 3: Start DCT-OS
|
|
84
|
+
|
|
85
|
+
Type the following and press **Enter**:
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
dct-os
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Your browser will open to DCT-OS with demo data loaded. Have a click around.
|
|
92
|
+
|
|
93
|
+
From now on, **DCT-OS starts automatically when you log in to Windows**. No command prompt needed. Just open your browser and go to:
|
|
94
|
+
|
|
95
|
+
**[http://localhost:5000](http://localhost:5000)**
|
|
96
|
+
|
|
97
|
+
> **Tip:** Bookmark that address. It's your DCT-OS.
|
|
98
|
+
|
|
99
|
+
### Updating
|
|
100
|
+
|
|
101
|
+
When a new version is available, a banner will appear at the top of DCT-OS. To update:
|
|
102
|
+
|
|
103
|
+
1. Open a command prompt (Windows key, type `cmd`, Enter)
|
|
104
|
+
2. Type:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
pip install --upgrade dct-os
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
3. Close the command prompt. DCT-OS will use the new version next time it starts.
|
|
111
|
+
|
|
112
|
+
Your data is never touched during updates.
|
|
113
|
+
|
|
114
|
+
### Uninstalling
|
|
115
|
+
|
|
116
|
+
To stop DCT-OS from starting automatically (your data is kept):
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
dct-os uninstall
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
To fully remove:
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
pip uninstall dct-os
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Your database stays in your user folder at `%LOCALAPPDATA%\DCT-OS\` unless you delete it manually.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Quick Start (for developers)
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pip install dct-os
|
|
136
|
+
dct-os
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Your browser opens automatically to [http://localhost:5000](http://localhost:5000). Demo data loads on first run.
|
|
140
|
+
|
|
141
|
+
### Auto-start on Windows
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
dct-os install # creates a silent startup entry
|
|
145
|
+
dct-os uninstall # removes it (keeps your data)
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Install from source
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
git clone https://github.com/h3ylis/dct-os.git
|
|
152
|
+
cd dct-os
|
|
153
|
+
pip install -e .
|
|
154
|
+
dct-os
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Options
|
|
158
|
+
|
|
159
|
+
| Environment variable | Default | Description |
|
|
160
|
+
|---|---|---|
|
|
161
|
+
| `DCT_PORT` | `5000` | Server port |
|
|
162
|
+
| `DCT_HOST` | `127.0.0.1` | Bind address |
|
|
163
|
+
| `DCT_DATA_DIR` | `.` (current dir) | Where to store the database |
|
|
164
|
+
| `DCT_NO_SEED` | unset | Set to `1` to start with an empty database |
|
|
165
|
+
|
|
166
|
+
## Licence and Use
|
|
167
|
+
|
|
168
|
+
DCT-OS is released under the [Business Source License 1.1](LICENSE).
|
|
169
|
+
|
|
170
|
+
**What this means:**
|
|
171
|
+
|
|
172
|
+
- **Free for internal use** — engineers, contractors, and organisations running it for their own cost tracking. Modify it, deploy it internally, use it on every project. No cost, no limits, no phone-home.
|
|
173
|
+
- **Commercial licence required** for hosted or embedded use — if you're offering DCT-OS to third parties as a service, bundling it into a product you sell, or reselling it, you need a commercial licence.
|
|
174
|
+
- **Converts to Apache 2.0** after four years per release — every version eventually becomes fully open under the Apache Licence.
|
|
175
|
+
|
|
176
|
+
See [LICENSING.md](LICENSING.md) for the full breakdown of what's free and what needs a commercial licence.
|
|
177
|
+
|
|
178
|
+
For commercial licensing enquiries: **astral2@gmx.de**
|
|
179
|
+
|
|
180
|
+
## Contributing
|
|
181
|
+
|
|
182
|
+
We welcome contributions. A Contributor Licence Agreement (CLA) is being configured — please open an issue for discussion before submitting pull requests.
|
|
183
|
+
|
|
184
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
|
|
185
|
+
|
|
186
|
+
## Contact
|
|
187
|
+
|
|
188
|
+
- Commercial licensing: astral2@gmx.de
|
|
189
|
+
- Bug reports and feature requests: [GitHub Issues](../../issues)
|
dct_os-0.1.0/README.md
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# DCT-OS
|
|
2
|
+
|
|
3
|
+
**Daily cost tracking, done right.**
|
|
4
|
+
|
|
5
|
+
DCT-OS is a cost tracking platform built for civil engineering — project managers, site engineers, and contractors who need to track daily costs without fighting enterprise software. SQLite-backed, self-hostable, and ready to deploy.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- Project and cost code management
|
|
10
|
+
- Daily docket entry with resource rate lookups
|
|
11
|
+
- PDF-assisted manual entry (PDF viewer + form side-by-side)
|
|
12
|
+
- Project summary, cost code breakdown, and supplier spend reports
|
|
13
|
+
- CSV and Excel export
|
|
14
|
+
- REST API for all operations
|
|
15
|
+
- Single binary or `pip install` — runs anywhere
|
|
16
|
+
|
|
17
|
+
## Installation (Windows)
|
|
18
|
+
|
|
19
|
+
You only need to do this once. After that, DCT-OS starts automatically every time you turn on your computer.
|
|
20
|
+
|
|
21
|
+
### Option A: Let Claude do it
|
|
22
|
+
|
|
23
|
+
If you have [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed, open it and paste this:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
Install DCT-OS for me. Run: pip install dct-os, then run: dct-os install.
|
|
27
|
+
If Python isn't installed, download and install it from python.org first
|
|
28
|
+
(make sure "Add Python to PATH" is ticked). After install, run: dct-os
|
|
29
|
+
to start it and open the browser.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Claude will handle the rest. Once it's done, bookmark [http://localhost:5000](http://localhost:5000) and you're set.
|
|
33
|
+
|
|
34
|
+
### Option B: Do it yourself
|
|
35
|
+
|
|
36
|
+
### Step 1: Install Python
|
|
37
|
+
|
|
38
|
+
1. Go to [python.org/downloads](https://www.python.org/downloads/)
|
|
39
|
+
2. Click the big yellow **Download Python** button
|
|
40
|
+
3. Run the installer
|
|
41
|
+
4. **Important:** Tick the box that says **"Add Python to PATH"** at the bottom of the first screen
|
|
42
|
+
5. Click **Install Now** and wait for it to finish
|
|
43
|
+
|
|
44
|
+
### Step 2: Install DCT-OS
|
|
45
|
+
|
|
46
|
+
1. Press the **Windows key**, type `cmd`, and press **Enter** to open a command prompt
|
|
47
|
+
2. Type the following and press **Enter**:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
pip install dct-os
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Wait for it to finish (you'll see some download progress, then it returns to the blinking cursor).
|
|
54
|
+
|
|
55
|
+
3. Type the following and press **Enter**:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
dct-os install
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
You'll see a confirmation message. That's it. You're done with the command prompt and can close it.
|
|
62
|
+
|
|
63
|
+
### Step 3: Start DCT-OS
|
|
64
|
+
|
|
65
|
+
Type the following and press **Enter**:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
dct-os
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Your browser will open to DCT-OS with demo data loaded. Have a click around.
|
|
72
|
+
|
|
73
|
+
From now on, **DCT-OS starts automatically when you log in to Windows**. No command prompt needed. Just open your browser and go to:
|
|
74
|
+
|
|
75
|
+
**[http://localhost:5000](http://localhost:5000)**
|
|
76
|
+
|
|
77
|
+
> **Tip:** Bookmark that address. It's your DCT-OS.
|
|
78
|
+
|
|
79
|
+
### Updating
|
|
80
|
+
|
|
81
|
+
When a new version is available, a banner will appear at the top of DCT-OS. To update:
|
|
82
|
+
|
|
83
|
+
1. Open a command prompt (Windows key, type `cmd`, Enter)
|
|
84
|
+
2. Type:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
pip install --upgrade dct-os
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
3. Close the command prompt. DCT-OS will use the new version next time it starts.
|
|
91
|
+
|
|
92
|
+
Your data is never touched during updates.
|
|
93
|
+
|
|
94
|
+
### Uninstalling
|
|
95
|
+
|
|
96
|
+
To stop DCT-OS from starting automatically (your data is kept):
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
dct-os uninstall
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
To fully remove:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
pip uninstall dct-os
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Your database stays in your user folder at `%LOCALAPPDATA%\DCT-OS\` unless you delete it manually.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Quick Start (for developers)
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
pip install dct-os
|
|
116
|
+
dct-os
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Your browser opens automatically to [http://localhost:5000](http://localhost:5000). Demo data loads on first run.
|
|
120
|
+
|
|
121
|
+
### Auto-start on Windows
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
dct-os install # creates a silent startup entry
|
|
125
|
+
dct-os uninstall # removes it (keeps your data)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Install from source
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
git clone https://github.com/h3ylis/dct-os.git
|
|
132
|
+
cd dct-os
|
|
133
|
+
pip install -e .
|
|
134
|
+
dct-os
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Options
|
|
138
|
+
|
|
139
|
+
| Environment variable | Default | Description |
|
|
140
|
+
|---|---|---|
|
|
141
|
+
| `DCT_PORT` | `5000` | Server port |
|
|
142
|
+
| `DCT_HOST` | `127.0.0.1` | Bind address |
|
|
143
|
+
| `DCT_DATA_DIR` | `.` (current dir) | Where to store the database |
|
|
144
|
+
| `DCT_NO_SEED` | unset | Set to `1` to start with an empty database |
|
|
145
|
+
|
|
146
|
+
## Licence and Use
|
|
147
|
+
|
|
148
|
+
DCT-OS is released under the [Business Source License 1.1](LICENSE).
|
|
149
|
+
|
|
150
|
+
**What this means:**
|
|
151
|
+
|
|
152
|
+
- **Free for internal use** — engineers, contractors, and organisations running it for their own cost tracking. Modify it, deploy it internally, use it on every project. No cost, no limits, no phone-home.
|
|
153
|
+
- **Commercial licence required** for hosted or embedded use — if you're offering DCT-OS to third parties as a service, bundling it into a product you sell, or reselling it, you need a commercial licence.
|
|
154
|
+
- **Converts to Apache 2.0** after four years per release — every version eventually becomes fully open under the Apache Licence.
|
|
155
|
+
|
|
156
|
+
See [LICENSING.md](LICENSING.md) for the full breakdown of what's free and what needs a commercial licence.
|
|
157
|
+
|
|
158
|
+
For commercial licensing enquiries: **astral2@gmx.de**
|
|
159
|
+
|
|
160
|
+
## Contributing
|
|
161
|
+
|
|
162
|
+
We welcome contributions. A Contributor Licence Agreement (CLA) is being configured — please open an issue for discussion before submitting pull requests.
|
|
163
|
+
|
|
164
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
|
|
165
|
+
|
|
166
|
+
## Contact
|
|
167
|
+
|
|
168
|
+
- Commercial licensing: astral2@gmx.de
|
|
169
|
+
- Bug reports and feature requests: [GitHub Issues](../../issues)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.0"
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from flask import Blueprint, jsonify
|
|
2
|
+
|
|
3
|
+
from .projects import bp as projects_bp
|
|
4
|
+
from .cost_codes import bp as cost_codes_bp
|
|
5
|
+
from .resources import bp as resources_bp
|
|
6
|
+
from .dockets import bp as dockets_bp
|
|
7
|
+
from .work_orders import bp as work_orders_bp
|
|
8
|
+
from .purchase_orders import bp as purchase_orders_bp
|
|
9
|
+
|
|
10
|
+
api = Blueprint("api", __name__, url_prefix="/api")
|
|
11
|
+
|
|
12
|
+
api.register_blueprint(projects_bp)
|
|
13
|
+
api.register_blueprint(cost_codes_bp)
|
|
14
|
+
api.register_blueprint(resources_bp)
|
|
15
|
+
api.register_blueprint(dockets_bp)
|
|
16
|
+
api.register_blueprint(work_orders_bp)
|
|
17
|
+
api.register_blueprint(purchase_orders_bp)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@api.route("/version", methods=["GET"])
|
|
21
|
+
def version_info():
|
|
22
|
+
from dct_os import __version__
|
|
23
|
+
from dct_os.db import get_update_info
|
|
24
|
+
info = {"version": __version__}
|
|
25
|
+
update = get_update_info()
|
|
26
|
+
if update:
|
|
27
|
+
info["update_available"] = update["latest"]
|
|
28
|
+
return jsonify(info)
|