-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
148 lines (133 loc) · 4.5 KB
/
mix.exs
File metadata and controls
148 lines (133 loc) · 4.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# SPDX-License-Identifier: PMPL-1.0-or-later
defmodule EtmaHandler.MixProject do
use Mix.Project
@version "2.0.0"
@description "eTMA Handler - Open University Marking Tool (BEAM Edition)"
def project do
[
app: :etma_handler,
version: @version,
elixir: "~> 1.17",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
description: @description,
package: package(),
# Tier 2: The Burrito Wrapper (Cross-Platform Binaries)
releases: releases()
]
end
defp package do
[
name: "etma_handler",
licenses: ["PMPL-1.0-or-later"],
links: %{
"GitHub" => "https://github.com/hyperpolymath/tma-mark2"
},
files: ~w(lib config mix.exs README.adoc LICENSE.txt LICENSES)
]
end
def application do
[
mod: {EtmaHandler.Application, []},
extra_applications: [:logger, :runtime_tools, :os_mon, :crypto]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp deps do
[
# --- The Core Engine ---
{:phoenix, "~> 1.7"},
{:phoenix_live_view, "~> 1.0"},
{:bandit, "~> 1.0"},
{:phoenix_html, "~> 4.0"},
{:phoenix_live_reload, "~> 1.5", only: :dev},
{:floki, ">= 0.36.0", only: :test},
{:esbuild, "~> 0.8", runtime: Mix.env() == :dev},
{:tailwind, "~> 0.2", runtime: Mix.env() == :dev},
{:heroicons, "~> 0.5"},
{:jason, "~> 1.4"},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.1"},
{:phoenix_live_dashboard, "~> 0.8"},
# --- The "Magic Bullet" Data Layer ---
# CubDB: Pure Elixir, crash-proof, append-only B-Tree database
# Runs everywhere the BEAM runs (RISC-V, Minix, etc.)
{:cubdb, "~> 2.0"},
# Cachex: In-process caching (replaces DragonflyDB complexity)
{:cachex, "~> 4.0"},
# Ecto for validation logic (schemaless changesets)
{:ecto, "~> 3.12"},
# SweetXml for parsing legacy .fhi and .docx files
{:sweet_xml, "~> 0.7"},
# Timex for date parsing (FHI dates use "23-Nov-2025 23:52:29" format)
{:timex, "~> 3.7"},
# --- The Fort Knox Vault (Security) ---
# Argon2id for password hashing (memory-hard, side-channel resistant)
{:argon2_elixir, "~> 4.0"},
# Rustler for Rust NIFs (crypto, NLP)
{:rustler, "~> 0.35"},
# --- Network & HTTP ---
# Mint for HTTP/2 client (VirusTotal, OU APIs)
{:mint, "~> 1.6"},
{:castore, "~> 1.0"},
# Req for high-level HTTP
{:req, "~> 0.5"},
# --- System Integration ---
# Watch Downloads folder for automatic file ingestion
{:file_system, "~> 1.0"},
# RSS/Atom parsing for forum monitoring
# TODO: Add when compatible parser available (feeder needs OTP update, feedraptor needs floki update)
# --- Logic & Rules ---
# Guesswork - Logic programming for learning rules (no LLMs)
{:guesswork, "~> 0.8"},
# --- Optional/Experimental ---
# CBOR encoding for efficient serialization
{:cbor, "~> 1.0"},
# Binary wrapper for cross-platform distribution
{:burrito, "~> 1.0", only: [:dev, :prod]}
]
end
# Burrito Configuration (The "Chimichanga")
defp releases do
[
etma_handler: [
steps: [:assemble] ++ burrito_steps(),
burrito: [
targets: [
# Linux (x86_64) - For Fedora/Ubuntu/Debian
linux: [os: :linux, cpu: :x86_64],
# Linux (ARM64) - For Raspberry Pi, Apple Silicon VMs
linux_arm: [os: :linux, cpu: :aarch64],
# Linux (RISC-V) - For development boards
riscv: [os: :linux, cpu: :riscv64],
# Windows (x86_64) - For work laptops
windows: [os: :windows, cpu: :x86_64],
# macOS (Intel)
macos_intel: [os: :darwin, cpu: :x86_64],
# macOS (Apple Silicon)
macos_arm: [os: :darwin, cpu: :aarch64]
]
]
]
]
end
defp burrito_steps do
if Code.ensure_loaded?(Burrito) do
[&Burrito.wrap/1]
else
[]
end
end
defp aliases do
[
setup: ["deps.get", "assets.setup", "assets.build"],
"assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
"assets.build": ["tailwind default", "esbuild default"],
"assets.deploy": ["tailwind default --minify", "esbuild default --minify", "phx.digest"],
test: ["test"]
]
end
end