···11+use serde::Deserialize;
22+33+/// A struct containing Luminary configuration, to be loaded from environment variables.
44+#[derive(Deserialize, Debug)]
55+pub struct LuminaryConfiguration {
66+ pub project_directory: String,
77+}
+8
packages/core/src/lib.rs
···11+//! The core library for Luminary, containing all logic related to managing projects and interacting with the Docker engine.
22+33+mod configuration;
44+pub mod engine;
55+pub mod model;
66+mod project;
77+88+pub use engine::LuminaryEngine;
···33use std::{collections::HashMap, path::Path};
4455use bollard::{query_parameters::ListContainersOptionsBuilder, secret::ContainerSummaryStateEnum};
66-use color_eyre::eyre::{Ok, Result, WrapErr};
76use docker_compose_types::Compose;
77+use eyre::{Ok, Result, WrapErr};
88use luminary_macros::wrap_err;
99use tokio::fs::{self, File};
10101111-use crate::core::{
1212- LuminaryCore,
1111+use crate::{
1212+ LuminaryEngine,
1313 model::{LuminaryProject, LuminaryService, LuminaryStatus},
1414};
1515···19192020const COMPOSE_FILENAME: &str = "compose.yml";
21212222-impl LuminaryCore {
2222+impl LuminaryEngine {
2323 /// Lists all Luminary projects by combining data from both the filesystem and Docker engine.
2424 #[wrap_err("Failed to list projects")]
2525 pub async fn list_projects(&self) -> Result<HashMap<String, LuminaryProject>> {
+5-4
packages/node/src/main.rs
···11+//! The main entry point for the Luminary Node, which serves as the backend for the Luminary Panel.
22+13use axum::Router;
22-use color_eyre::eyre::Result;
34use dotenv::dotenv;
55+use eyre::Result;
46use tokio::net::TcpListener;
5768mod api;
77-mod core;
89910#[tokio::main]
1011async fn main() -> Result<()> {
1112 dotenv().ok();
12131313- let core = core::LuminaryCore::new()?;
1414- let projects = core.list_projects().await?;
1414+ let engine = luminary_core::LuminaryEngine::default()?;
1515+ let projects = engine.list_projects().await?;
1516 println!("Projects: {:#?}", projects);
16171718 // let listener = TcpListener::bind("0.0.0.0:9000").await?;