Skip to content

Commit

Permalink
Standardize API Model Naming & Centralize Date/Time Localization (#6)
Browse files Browse the repository at this point in the history
* Use naming convention same as in api spec

* Updating basic info
  • Loading branch information
akadlec authored Feb 16, 2025
1 parent b1811e5 commit 60bb391
Show file tree
Hide file tree
Showing 24 changed files with 420 additions and 508 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<p align="center">
<img src="https://github.com/fastybird/.github/blob/main/assets/repo_title.png?raw=true" alt="FastyBird"/>
</p>

# 🌟 FastyBird Smart Panel – Your Smart Home, Simplified

Welcome to **FastyBird Smart Panel** – an **intelligent, real-time, and beautifully designed** smart home control system.
Whether you're **tweaking device settings, automating routines, or managing your home from a sleek touchscreen**, FastyBird gives you **the power to do it all effortlessly!**

---

## 🏠 **One System, Three Powerful Components**

### 🖥️ **Smart Panel Backend**
⚡ The **brain** of the system – handling **device communication, automation, and data processing**.
🛠️ Built with **NestJS & TypeORM**, ensuring **scalability, flexibility, and real-time performance**.

### ⚙️ **Admin Panel**
🎛️ A **powerful web app** to **configure, customize, and fine-tune** your smart home setup.
🌍 Runs anywhere with a browser, powered by **Vue.js**.

### 📱 **Display App**
🖐️ A **beautiful touchscreen interface** for **Raspberry Pi & embedded displays**.
🚀 **Built with Flutter** for a **fast, smooth, and real-time** user experience.

---

## **Why FastyBird Smart Panel?**
**Modern & Modular** – Fully customizable dashboards and widgets
**Real-time Updates****Instant control** over your devices
**Multi-Platform** – Works on **web, mobile, and embedded screens**
**Seamless Automation****Easily configure** routines and actions
**Open & Extensible****Integrates with multiple smart home ecosystems**

🌍 **Take control of your smart home today!**

🚀 **Powered by [FastyBird](https://fastybird.com)**
33 changes: 12 additions & 21 deletions apps/backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ Built on **NestJS**, **TypeORM**, and modern technologies, it delivers a **scala

## ✨ Features

**Device Management** – Control devices, channels, properties, and automation.
**Real-time Updates** – Instant state changes via WebSockets.
**Dashboard & UI** – Organize information with **pages, cards, and tiles**.
**Weather & System Info** – Display **current weather, forecasts, and device stats**.
**Robust Validation & Error Handling** – Ensures reliability and security.
**Database Integration** – Supports SQL databases via TypeORM.
**Modular Architecture** – Scalable and maintainable design.
- **Device Management** – Control devices, channels, properties, and automation.
- **Real-time Updates** – Instant state changes via WebSockets.
- **Dashboard & UI** – Organize information with **pages, cards, and tiles**.
- **Weather & System Info** – Display **current weather, forecasts, and device stats**.
- **Robust Validation & Error Handling** – Ensures reliability and security.
- **Database Integration** – Supports SQL databases via TypeORM.
- **Modular Architecture** – Scalable and maintainable design.

## 📂 Project Structure

Expand Down Expand Up @@ -98,40 +98,31 @@ Before starting, make sure you have the following installed:

## 🚀 Getting Started

### 1. Clone the Repository
### 1️⃣ Clone the Repository

```shell
git clone https://github.com/fastybird/smart-panel.git
cd apps/backend
```
### 2. Install Dependencies
### 2️⃣ Install Dependencies

```shell
yarn install
```

### 3. Set Up Environment Variables

Create a .env file in the root directory and configure the following variables:

```shell
DATABASE_URL=your-database-url
NODE_ENV=development
```

### 4. Run Migrations
### 3️⃣ Run Migrations

```shell
yarn typeorm:migration:run
```

### 5. Start the Server
### 4️⃣ Start the Server

```shell
yarn start:dev
```

### 6. Access the API
### 5️⃣ Access the API

The server runs on http://localhost:3000 by default. Test endpoints using a tool like Postman or cURL.

Expand Down
43 changes: 27 additions & 16 deletions apps/panel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,23 @@
<img src="https://github.com/fastybird/.github/blob/main/assets/repo_title.png?raw=true" alt="FastyBird"/>
</p>

# 📱 Smart Panel
# 📱 Smart Panel Display

**FastyBird Smart Panel** is a **modern** and **customizable** display app for managing your **smart home devices**.
Built with **Flutter**, it delivers a **seamless**, **intuitive**, and **real-time** experience on dedicated touchscreens.
The **Smart Panel Display App** is the **interactive interface** of the **FastyBird Smart Panel**, providing seamless
control and monitoring of smart home devices.

🚀 **Powered by the FastyBird ecosystem**
🌍 **Cross-platform with Flutter**
**Real-time WebSocket updates**
🔧 **Customizable dashboard with widgets**
Built with **Flutter**, it offers a **modern**, **customizable**, and **real-time** experience on dedicated touchscreens.

---

## ✨ Features

**Beautiful UI** – Clean, intuitive, and optimized for **touchscreens**
**Device Control** – Toggle lights, adjust temperatures, and monitor sensors
**Real-time Updates** – WebSocket integration for instant feedback
**Weather Forecast** – OpenWeather API integration for daily forecasts
**Multi-Screen Support** – Manage multiple dashboards efficiently
**Customizable Widgets** – Resize, rearrange, and personalize widgets
- **Beautiful UI** – Clean, intuitive, and optimized for **touchscreens**
- **Device Control** – Toggle lights, adjust temperatures, and monitor sensors
- **Real-time Updates** – WebSocket integration for instant feedback
- **Weather Forecast** – OpenWeather API integration for daily forecasts
- **Multi-Screen Support** – Manage multiple dashboards efficiently
- **Customizable Widgets** – Resize, rearrange, and personalize widgets

---

Expand Down Expand Up @@ -89,21 +86,35 @@ Then run on the Pi:
flutter-pi --release /path/to/flutter_assets
```

### 🧪 Running Tests

Run unit tests:

```shell
flutter test
```

Analyze code quality:

```shell
dart analyze .
```

## 📡 Raspberry Pi Deployment

1. Build the app
### 1️⃣ Build the app

```shell
flutter build bundle
```

2. Transfer the app to your Pi
### 2️⃣ Transfer the app to your Pi

```shell
scp -r build/flutter_assets pi@raspberrypi:/home/pi/
```

3. Run on Raspberry Pi
### 3️⃣ Run on Raspberry Pi

```shell
flutter-pi /home/pi/flutter_assets
Expand Down
8 changes: 4 additions & 4 deletions apps/panel/lib/app/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:fastybird_smart_panel/app/locator.dart';
import 'package:fastybird_smart_panel/core/repositories/configuration.dart';
import 'package:fastybird_smart_panel/core/repositories/weather.dart';
import 'package:fastybird_smart_panel/core/services/startup_manager.dart';
import 'package:fastybird_smart_panel/core/types/localization.dart';
import 'package:fastybird_smart_panel/core/types/configuration.dart';
import 'package:fastybird_smart_panel/core/utils/theme.dart';
import 'package:fastybird_smart_panel/features/dashboard/repositories/data/devices/devices.dart';
import 'package:fastybird_smart_panel/features/dashboard/repositories/data/scenes/scenes.dart';
Expand Down Expand Up @@ -49,13 +49,13 @@ class MyApp extends StatelessWidget {
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: LanguageType.values.map(
supportedLocales: Language.values.map(
(item) =>
Locale(item.value.split('_')[0], item.value.split('_')[1]),
),
locale: Locale(
LanguageType.english.value.split('_')[0],
LanguageType.english.value.split('_')[1],
Language.english.value.split('_')[0],
Language.english.value.split('_')[1],
),
home: Scaffold(
body: Center(
Expand Down
6 changes: 3 additions & 3 deletions apps/panel/lib/app/app/body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:fastybird_smart_panel/app/locator.dart';
import 'package:fastybird_smart_panel/app/routes.dart';
import 'package:fastybird_smart_panel/core/repositories/configuration.dart';
import 'package:fastybird_smart_panel/core/services/navigation.dart';
import 'package:fastybird_smart_panel/core/types/localization.dart';
import 'package:fastybird_smart_panel/core/types/configuration.dart';
import 'package:fastybird_smart_panel/core/utils/theme.dart';
import 'package:fastybird_smart_panel/features/dashboard/presentation/pages/device_detail.dart';
import 'package:fastybird_smart_panel/features/overlay/lock.dart';
Expand All @@ -26,7 +26,7 @@ class _AppBodyState extends State<AppBody> {
locator<ConfigurationRepository>();

bool _hasDarkMode = false;
LanguageType _language = LanguageType.english;
Language _language = Language.english;
int _screenLockDuration = 30;

Timer? _inactivityTimer;
Expand Down Expand Up @@ -171,7 +171,7 @@ class _AppBodyState extends State<AppBody> {
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: LanguageType.values.map(
supportedLocales: Language.values.map(
(item) => Locale(item.value.split('_')[0], item.value.split('_')[1]),
),
locale: Locale(
Expand Down
4 changes: 2 additions & 2 deletions apps/panel/lib/app/app/error.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:fastybird_smart_panel/app/locator.dart';
import 'package:fastybird_smart_panel/core/services/screen.dart';
import 'package:fastybird_smart_panel/core/types/localization.dart';
import 'package:fastybird_smart_panel/core/types/configuration.dart';
import 'package:fastybird_smart_panel/core/utils/theme.dart';
import 'package:fastybird_smart_panel/l10n/app_localizations.dart';
import 'package:flutter/material.dart';
Expand All @@ -24,7 +24,7 @@ class AppError extends StatelessWidget {
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: LanguageType.values.map(
supportedLocales: Language.values.map(
(item) => Locale(item.value.split('_')[0], item.value.split('_')[1]),
),
locale: Locale('en', 'US'),
Expand Down
38 changes: 0 additions & 38 deletions apps/panel/lib/core/models/general/audio_configuration.dart

This file was deleted.

Loading

0 comments on commit 60bb391

Please sign in to comment.