https://github.com/mazurel/sopa
https://github.com/mazurel/sopa
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mazurel/sopa
- Owner: Mazurel
- License: gpl-2.0
- Created: 2024-12-27T09:25:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-08-24T15:28:28.000Z (10 months ago)
- Last Synced: 2025-08-24T20:20:31.270Z (10 months ago)
- Language: Rust
- Size: 47.9 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SOPa
**SOP** *Aphia* is an open-source web application designed to help people find support centers and social assistance locations.
## ๐ Features
- **Location Finder**: Search and discover support centers based on your specific needs
- **Tag-based Filtering**: Filter locations by various categories
- **Location Management**: Add, edit, and manage support center information
- **Dark/Light Mode**: Automatic color scheme detection and switching
- **Data Import/Export**: Save and share location databases as `.bson` files
## ๐๏ธ Architecture
This project is built as a Rust workspace with two main components:
- **`frontend/`** - Web application built with [Yew](https://yew.rs/) framework
- **`libsopa/`** - Core library containing shared data structures and business logic
- **`locales/`** - Localization files for internationalization
- **`.github/`** - CI configuration files for continuous integration and deployment
### Database Architecture
The application uses a sophisticated multi-layer database system designed for web-based operation:
#### Storage Layers
1. **Browser Persistence (IndexedDB)**
- Primary storage using the browser's IndexedDB API
- Automatic synchronization between memory and persistent storage
2. **BSON Serialization**
- Location data serialized to Binary JSON (BSON) format
- Enables efficient import/export of entire databases
- Backwards-compatible schema with migration support
- Default database embedded as binary data in the application
3. **In-Memory Operations**
- HashMap-based storage (`HashMap`) for fast lookups
- UUID-based unique identification for all locations
- Tag-based filtering and preference-based sorting algorithms
## ๐ Getting Started
### Prerequisites
- [Rust](https://rustup.rs/) (latest stable version)
- [Trunk](https://trunkrs.dev/) for building the frontend
```bash
# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Add WASM target
rustup target add wasm32-unknown-unknown
# Install Trunk
cargo install trunk
```
### Development
1. Clone the repository:
```bash
git clone https://github.com/your-username/sopa.git
cd sopa
```
2. Start the development server:
```bash
cd frontend
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk serve
```
3. Open your browser and navigate to `http://localhost:8080`
### Building for Production
```bash
cd frontend
RUSTFLAGS='--cfg getrandom_backend="wasm_js"' trunk build --release
```
The built application will be available in the `frontend/dist/` directory.
## ๐ Internationalization
The application supports multiple languages through the `rust-i18n` crate:
- Polish (pl)
- English (en)
Translations are stored in the `locales/` directory as YAML files.
## ๐งช Testing
Run the test suite:
```bash
cargo test
```
## โ ๏ธ Development Status
**This is alpha software currently in active development.** Features may be incomplete, unstable, or subject to change. Use for testing and feedback purposes only.
## ๐ License
This project is licensed under the GNU General Public License v2.0 - see the [LICENSE](LICENSE) file for details.
## ๐ Acknowledgments
- Built with [Yew](https://yew.rs/) - A modern Rust framework for creating multi-threaded frontend web apps with WebAssembly
- UI components powered by [Bulma](https://bulma.io/) CSS framework