Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@
<a href="https://github.com/Jamalianpour/open-dev/license">
<img alt="GitHub" src="https://img.shields.io/github/license/Jamalianpour/open-dev">
</a>
<a href="https://github.com/Jamalianpour/open-dev/releases">
<img alt="Static Badge" src="https://img.shields.io/badge/Download-OpenDev-0062A1">
</a>
</div>

## Description
**Open Dev** is a free and open-source assistant designed to make coding easier. Built with Flutter, Open Dev provides a suite of tools for developers to enhance their productivity and streamline their workflows. From parsing JSON to generating secure passwords, Open Dev offers a comprehensive set of utilities akin to those found in [DevUtils](https://devutils.com/) and [DevToys](https://devtoys.app/).

Let's try it now in your browser [Open Dev](https://jamalianpour.github.io/open-dev)

![OpenDev Dashboard](assets/screenshot/dashboard.png)

## Table of Contents
1. [Features 🚀](#features)
2. [Screenshots 📷](#screenshots)
Expand All @@ -24,28 +29,43 @@ Let's try it now in your browser [Open Dev](https://jamalianpour.github.io/open-

## Features 🚀
- **JSON Parser and Converter to YAML:** Parse and show JSON in object viewer to read and search, Easily convert JSON data to YAML format for better readability and use in various applications.

- **XML Parser and Converter to JSON:** Transform XML data into JSON format effortlessly, making it easier to work with in JavaScript and other environments.

- **Cron Parser:** Interpret and validate cron expressions to ensure correct scheduling of automated tasks.

- **Unix Time Converter:** Convert Unix timestamps to human-readable dates and vice versa, simplifying the handling of time data.

- **README Helper and Real-time Viewer:** Create and preview README files in real-time to ensure your documentation looks perfect.

- **Developer News Based on RSS:** Stay updated with the latest developer news through RSS feeds from popular sources.

- **Base64 String/Image Encode/Decode:** Encode and decode Base64 strings and images for data processing and transmission.

- **JWT Debugger:** Decode and debug JSON Web Tokens (JWT) to verify token contents and ensure security it locally without internet connection.

- **Hash Generator:** Generate cryptographic hashes for strings to ensure data integrity and security.

- **Color Converter:** Convert colors between different formats (HEX, RGB, HSL) for design and development purposes.

- **RegExp Tester:** Test and debug regular expressions to ensure they match the intended patterns.

- **Lorem Ipsum Generator:** Generate placeholder text for your projects to fill in design layouts.

- **Password Generator:** Create secure, random passwords to enhance security.

- **QR Code Generator:** Generate QR codes from text or URLs for easy sharing and access.

- **Image Extensions Formatter:** Convert images between different file formats for compatibility and optimization.

- **URL Encode/Decode:** Encode and decode URLs to ensure proper formatting and transmission.

- **UUID Generator/Decoder:** Generate and decode UUIDs (Universally Unique Identifiers) for use in applications that require unique identifiers.


## Screenshots 📷
Here are some screenshots of Open Dev in action:

![OpenDev Dashboard](assets/screenshot/dashboard.png)

| Hash Generator | JSON Parser and Converter to YAML |
| ------------------------------------------------------- | ---------------------------------------------- |
| ![Hash Generator](assets/screenshot/Hash.png) | ![JSON Parser](assets/screenshot/json.png) |
Expand Down
5 changes: 4 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_acrylic/flutter_acrylic.dart';
import 'package:open_dev/views/base_view.dart';
import 'package:open_dev/views/size_error_view.dart';
import 'package:window_manager/window_manager.dart';

import 'utils/color_schemes.g.dart';
Expand Down Expand Up @@ -58,7 +59,9 @@ class MyApp extends StatelessWidget {
darkTheme: ThemeData(useMaterial3: true, colorScheme: darkColorScheme),
debugShowCheckedModeBanner: false,
home: kIsWeb
? Container(color: Colors.grey[900], child: const BaseView())
? MediaQuery.sizeOf(context).width < 800
? const SizeErrorView()
: Container(color: Colors.grey[900], child: const BaseView())
: const SafeArea(
child: TitlebarSafeArea(
child: BaseView(),
Expand Down
85 changes: 85 additions & 0 deletions lib/utils/uuid_utils.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import 'package:uuid/uuid.dart';

class UuidUtils {
static String generateV4() {
return const Uuid().v4();
}

static String generateV5(String namespace, String name) {
return const Uuid().v5(namespace, name);
}

static String generateV6() {
return const Uuid().v6();
}

static String generateV7() {
return const Uuid().v7();
}

static String generateV8() {
return const Uuid().v8();
}

static String generateV1() {
return const Uuid().v1();
}

/// Decodes a UUID and extracts its version, variant, timestamp, clock sequence, and node.
///
/// - param `String` uuid - The UUID to decode.
/// - return `Tuple` A tuple containing the version, variant, timestamp, clock sequence, and node.
static (int, String, int, int, String) decode(String uuid) {
// Parse the UUID to a list of bytes
List<int> bytes = Uuid.parse(uuid);

// Extracting information from the UUID
var version = bytes[6] >> 4; // Version is in the 7th byte
var variant = (bytes[8] & 0xC0) >> 6; // Variant is in the 9th byte

// Extract timestamp (60 bits: 4 bits from byte 6, all bits from byte 7, 5, 4, 3, 2, and 1)
var timestamp = ((bytes[6] & 0x0F) << 56) |
(bytes[7] << 48) |
(bytes[4] << 40) |
(bytes[5] << 32) |
(bytes[0] << 24) |
(bytes[1] << 16) |
(bytes[2] << 8) |
bytes[3];

// UUID timestamp is in 100-nanosecond intervals since 1582-10-15
// Convert to Unix epoch (1970-01-01)
const UUID_EPOCH = 0x01B21DD213814000;
timestamp -= UUID_EPOCH;
var millisecondsSinceEpoch = timestamp ~/ 10000; // Convert to milliseconds

// Extract clock sequence
var clockSeq = ((bytes[8] & 0x3F) << 8) | bytes[9];

// Extract node (MAC address)
var node = [
bytes[10].toRadixString(16).padLeft(2, '0'),
bytes[11].toRadixString(16).padLeft(2, '0'),
bytes[12].toRadixString(16).padLeft(2, '0'),
bytes[13].toRadixString(16).padLeft(2, '0'),
bytes[14].toRadixString(16).padLeft(2, '0'),
bytes[15].toRadixString(16).padLeft(2, '0')
].join(':');

String variantName = '';

if (variant == 0) {
variantName = '0 (NCS backward compatibility)';
} else if (variant == 1) {
variantName = '1 (RFC 4122/DCE 1.1)';
} else if (variant == 2) {
variantName = '2 (Microsoft\'s GUIDs)';
} else if (variant == 3) {
variantName = '3 (Reserved for future use)';
} else {
variantName = 'Unknown';
}

return (version, variantName, millisecondsSinceEpoch, clockSeq, node);
}
}
4 changes: 3 additions & 1 deletion lib/views/base_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import 'readme_view.dart';
import 'regex_view.dart';
import 'unix_time_view.dart';
import 'url_view.dart';
import 'uuid_view.dart';

class BaseView extends StatefulWidget {
const BaseView({super.key});
Expand Down Expand Up @@ -73,7 +74,8 @@ class _BaseViewState extends State<BaseView> {
const PasswordView(),
const QrView(),
const ImageView(),
const UrlView()
const UrlView(),
const UuidView(),
],
),
),
Expand Down
33 changes: 33 additions & 0 deletions lib/views/dashboard_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,39 @@ class DashboardView extends StatelessWidget {
],
),
),
Padding(
padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 16),
child: Row(
children: [
Expanded(
child: Semantics(
button: true,
label:
'UUID Generator/Decode | Generate and decode UUIDs (Universally Unique Identifiers) for use in applications that require unique identifiers.',
child: DashboardCard(
title: 'UUID Generator/Decode',
description:
'Generate and decode UUIDs (Universally Unique Identifiers) for use in applications that require unique identifiers.',
icon: const Icon(
CupertinoIcons.underline,
size: 50,
color: Colors.white60,
),
onTap: () {
sideMenu.changePage(17);
},
),
),
),
const SizedBox(
width: 16,
),
const Expanded(
child: SizedBox.shrink(),
),
],
),
),
],
),
),
Expand Down
36 changes: 36 additions & 0 deletions lib/views/size_error_view.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import 'package:flutter/material.dart';

class SizeErrorView extends StatelessWidget {
const SizeErrorView({super.key});

@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.max,
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Image.asset(
'assets/logo/icon.png',
width: 125,
height: 125,
),
),
const Padding(
padding: EdgeInsets.all(16),
child: Text(
'Sorry but currently Open Dev is not supported on this device 📱. Please use a device with a larger screen 🖥️.',
textAlign: TextAlign.center,
style: TextStyle(fontSize: 18, height: 1.8),
),
),
],
),
),
);
}
}
Loading