How exabyte-io/made works
Project type and purpose
• This is an open‐source, multi‐language library (“Made”) for Materials Design (core API and utilities), implemented in JavaScript/TypeScript (for browser/Node.js) and in Python (for desktop/Pyodide).
• It provides:
• Core domain classes (Material, Basis, Lattice, Cell, Constraints)
• File‐format parsers (POSCAR, XYZ, QE, etc.)
• Structural generation & analysis tools (supercell, surfaces, combinatorial sets, etc.)
A. External Data Formats (POSCAR, XYZ, Quantum ESPRESSO…)
B. Parsers Layer (src/js/parsers / src/py/mat3ra/.../parsers)
C. Core Domain Layer
– Basis
– Lattice (& ReciprocalLattice)
– Cell (primitive/conventional)
– Material
– AtomicConstraints
D. Tools Layer (src/js/tools / src/py/mat3ra/.../tools)
– build (defect, grain boundary, slab, nanoparticle, etc.)
– analyze (coordination, RDF, etc.)
– calculate (ASE, interaction functions)
– convert, modify, optimize, site, third_party
E. Packaging & Build
– JS/TS: tsconfig → Babel/TypeScript → dist/js + .d.ts → npm
– Python: pyproject.toml → wheel → PyPI (optionally with [tools])
– CI/CD: GitHub Actions (cicd.yml)
– Pre‐commit hooks (Husky + ESLint + Prettier / lint‐staged)
F. Test Suites
– JS: Mocha tests under tests/js
– Python: pytest under tests/py
Component relationships and data flow
• External Data Formats → Parsers → Domain Objects
• Domain Objects ↔ Tools (tools consume and sometimes return new domain objects)
• Domain Objects & Tools → exported API surface (index.ts / __init__.py)
• Source → Build/Transpile → Distribution packages → Registry (npm / PyPI)
• All code & tests → CI/CD pipeline → Automated testing & publishing
Architectural patterns & design principles
• Layered architecture: Parsers → Core domain → Tools → API export
• Modular design: each concept (basis, cell, lattice) in its own module/directory
• Language‐agnostic convention: mirrored folder structure in JS (src/js/…) and Python (src/py/mat3ra/…)
• Clear separation of pure class methods vs. external‐parameter tools (per ESSE & in‐README conventions)
Detail level
• Every major module directory as a separate component (e.g., “parsers”, “tools/build”, “tools/analyze”)
• Test frameworks and test directories as a separate “Testing” subsystem connected to source code