Live App: https://buckle-app.netlify.app/
Finite element analysis web application for 3D structural frame modeling.
Learn how to use Buckle:
- React 18
- TypeScript
- Vite
- Three.js
- Material-UI (MUI)
- MobX
- FastAPI
- OpenSeesPy
- MongoDB
- Pydantic
The project is organized into two main directories:
buckle/
├── frontend/ # React TypeScript frontend application
│ ├── src/
│ │ ├── model/ # Core model system (Three.js scene, elements, state)
│ │ ├── ui/ # UI components (Layout, Model dialogs, Results)
│ │ ├── pages/ # Application pages
│ │ ├── components/# Reusable UI components
│ │ └── types.ts # TypeScript type definitions
│ ├── public/ # Static assets and examples
│ └── package.json # Frontend dependencies
│
├── backend/ # FastAPI Python backend
│ ├── main.py # FastAPI application entry point
│ ├── opensees/ # OpenSees analysis integration
│ ├── routes/ # API route handlers
│ ├── models/ # Data models
│ ├── schemas/ # Pydantic schemas
│ ├── tests/ # Test suite
│ └── requirements.txt # Python dependencies
│
└── README.md # This file
The frontend uses a centralized Model class (src/model/Model.ts) that manages:
- Three.js scene, renderer, and camera
- Collections of structural elements (nodes, members, boundary conditions, loads)
- Interactive tools (selector, snapper, line drawing)
- Visualization components (grid helper, labeler, post-processing)
Structural elements inherit from base classes and manage their own Three.js geometry:
- Node: Point elements in 3D space
- ElasticBeamColumn: Frame members connecting two nodes
- BoundaryCondition: Constraints on node degrees of freedom
- Load: Forces applied to nodes or members
The UI is organized into:
- Layout: Main application shell (TopBar, LeftBar, StatusBar)
- Model UI: Dialogs for adding/editing structural elements
- Results UI: Post-processing visualization (diagrams, displacements, reactions)
- Draw UI: Interactive drawing tools
/analysis- Run FEA analysis on structural models/health- Health check endpoint/ready- Readiness check for Kubernetes/benchmarks- Retrieve benchmark models/ws/{client_id}- WebSocket endpoint for real-time communication (not used at the moment)
The backend integrates with OpenSeesPy for finite element analysis, supporting:
- Linear static analysis
- Various section types (rectangular, circular, I-sections, etc.)
- Elastic materials
- Multiple load types (nodal and distributed loads)
- Node.js (v18 or higher) and npm
- Python (v3.12 or higher)
- MongoDB (optional, for user authentication features)
- Navigate to the frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
npm run devThe frontend will be available at http://localhost:5173 (or the port shown in the terminal).
- Navigate to the backend directory:
cd backend- Create a virtual environment:
# Windows
python -m venv env
.\env\Scripts\activate
# macOS/Linux
python3 -m venv env
source env/bin/activate- Install dependencies:
pip install --upgrade pip
pip install -r requirements.txt- Start the backend server:
python main.pyThe backend API will be available at http://localhost:8000.
- Access API documentation:
- Swagger UI:
http://localhost:8000/docs - ReDoc:
http://localhost:8000/redoc
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linter
npm run lintFor issues, questions, or contributions, please refer to the project repository or contact the maintainers.