restructure project files layout

This commit is contained in:
Jamie Pine 2022-03-31 17:41:17 -07:00
parent 19d5036cce
commit b121f0fed6
132 changed files with 46 additions and 2613 deletions

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GitToolBoxProjectSettings">
<option name="commitMessageIssueKeyValidationOverride">
<BoolValueOverride>
<option name="enabled" value="true" />
</BoolValueOverride>
</option>
<option name="commitMessageValidationConfigOverride">
<CommitMessageValidationOverride>
<option name="enabled" value="true" />
</CommitMessageValidationOverride>
</option>
</component>
</project>

View file

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="EslintConfiguration">
<option name="fix-on-save" value="true" />
</component>
</project>

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/spacedrive.iml" filepath="$PROJECT_DIR$/.idea/spacedrive.iml" />
</modules>
</component>
</project>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="PrettierConfiguration">
<option name="myRunOnSave" value="true" />
</component>
</project>

View file

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/apps/desktop/src-tauri/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/temp" />
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
<excludeFolder url="file://$MODULE_DIR$/tmp" />
<excludeFolder url="file://$MODULE_DIR$/packages/core/target" />
<excludeFolder url="file://$MODULE_DIR$/apps/desktop/src-tauri/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View file

@ -1,222 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CargoProjects">
<cargoProject FILE="$PROJECT_DIR$/packages/core/Cargo.toml" />
<cargoProject FILE="$PROJECT_DIR$/apps/desktop/src-tauri/Cargo.toml" />
</component>
<component name="ChangeListManager">
<list default="true" id="e9f4d63e-e014-4f5b-9bf1-6c3b1fae8f30" name="Changes" comment="- tcp listener WIP&#10;- better settings">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/packages/core/lib/file/client.rs" beforeDir="false" afterPath="$PROJECT_DIR$/packages/core/lib/file/client.rs" afterDir="false" />
<change beforePath="$PROJECT_DIR$/packages/core/lib/file/indexer.rs" beforeDir="false" afterPath="$PROJECT_DIR$/packages/core/lib/file/indexer.rs" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="TypeScript JSX File" />
<option value="Rust File" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="GitSEFilterConfiguration">
<file-type-list>
<filtered-out-file-type name="LOCAL_BRANCH" />
<filtered-out-file-type name="REMOTE_BRANCH" />
<filtered-out-file-type name="TAG" />
<filtered-out-file-type name="COMMIT_BY_MESSAGE" />
</file-type-list>
</component>
<component name="GitToolBoxStore">
<option name="projectConfigVersion" value="4" />
</component>
<component name="GotoFileConfiguration">
<file-type-list>
<filtered-out-file-type name="ActionScript" />
<filtered-out-file-type name="Angular2Html" />
<filtered-out-file-type name="Angular2Svg" />
<filtered-out-file-type name="AUTO_DETECTED" />
<filtered-out-file-type name="CoffeeScript" />
<filtered-out-file-type name="Cucumber" />
<filtered-out-file-type name="DTD" />
<filtered-out-file-type name="ECMAScript 6" />
<filtered-out-file-type name="EditorConfig" />
<filtered-out-file-type name="EJS" />
<filtered-out-file-type name="Flow" />
<filtered-out-file-type name="Haml" />
<filtered-out-file-type name="HgIgnore file" />
<filtered-out-file-type name="Handlebars/Mustache" />
<filtered-out-file-type name="HTML" />
<filtered-out-file-type name="HTTP Request" />
<filtered-out-file-type name="IDEA_MODULE" />
<filtered-out-file-type name="IDEA_PROJECT" />
<filtered-out-file-type name="IDEA_WORKSPACE" />
<filtered-out-file-type name="IgnoreLang file" />
<filtered-out-file-type name="Jade" />
<filtered-out-file-type name="Jest Snapshot" />
<filtered-out-file-type name="JQL" />
<filtered-out-file-type name="JSHint" />
<filtered-out-file-type name="Less" />
<filtered-out-file-type name="PLAIN_TEXT" />
<filtered-out-file-type name="PATCH" />
<filtered-out-file-type name="Literate CoffeeScript" />
<filtered-out-file-type name="Cookie storage file" />
<filtered-out-file-type name="CSS" />
<filtered-out-file-type name="Dictionary" />
<filtered-out-file-type name="GitExclude file" />
<filtered-out-file-type name="GitIgnore file" />
<filtered-out-file-type name="IntegrationPerformanceTest" />
<filtered-out-file-type name="JSON-lines" />
<filtered-out-file-type name="JSON5" />
<filtered-out-file-type name="JSX Harmony" />
<filtered-out-file-type name="RegExp" />
<filtered-out-file-type name="RNG Compact" />
<filtered-out-file-type name="Shell Script" />
<filtered-out-file-type name="SourceMap" />
<filtered-out-file-type name="Spacebars" />
<filtered-out-file-type name="Stylus" />
<filtered-out-file-type name="textmate" />
<filtered-out-file-type name="Vue.js" />
<filtered-out-file-type name="XHTML" />
<filtered-out-file-type name="XPath" />
<filtered-out-file-type name="XPath2" />
<filtered-out-file-type name="yarn.lock" />
<filtered-out-file-type name="Angular Metadata JSON" />
<filtered-out-file-type name="ARCHIVE" />
<filtered-out-file-type name="CVP" />
<filtered-out-file-type name="dependency diagram" />
<filtered-out-file-type name="Image" />
<filtered-out-file-type name="Native" />
<filtered-out-file-type name="UML" />
<filtered-out-file-type name="UNKNOWN" />
<filtered-out-file-type name="Directory" />
</file-type-list>
</component>
<component name="JsBowerSettings">
<bower-package value="" />
<bower.json value="" />
</component>
<component name="MacroExpansionManager">
<option name="directoryName" value="v1czs84n" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="OptimizeOnSaveOptions">
<option name="myRunOnSave" value="true" />
</component>
<component name="ProjectId" id="24eJYnz3rTDPNpb2oOoxp5Ri3GO" />
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectViewState">
<option name="autoscrollFromSource" value="true" />
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.standard" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.standard" value="" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
<property name="nodejs_package_manager_path" value="yarn" />
<property name="org.rust.cargo.project.model.PROJECT_DISCOVERY" value="true" />
<property name="prettierjs.PrettierConfiguration.Package" value="$PROJECT_DIR$/node_modules/prettier" />
<property name="settings.editor.selected.configurable" value="language.rust.cargo.check" />
<property name="ts.external.directory.path" value="$PROJECT_DIR$/node_modules/typescript/lib" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/apps/desktop/src/screens/settings" />
</key>
</component>
<component name="RustProjectSettings">
<option name="macroExpansionEngine" value="OLD" />
<option name="runExternalLinterOnTheFly" value="true" />
<option name="toolchainHomeDirectory" value="$USER_HOME$/.cargo/bin" />
<option name="version" value="2" />
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="e9f4d63e-e014-4f5b-9bf1-6c3b1fae8f30" name="Changes" comment="" />
<created>1643985169569</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1643985169569</updated>
<workItem from="1643985171248" duration="1282000" />
<workItem from="1644447242960" duration="284000" />
<workItem from="1644608558680" duration="18817000" />
<workItem from="1644942978637" duration="7500000" />
<workItem from="1645404043913" duration="32248000" />
<workItem from="1645491633303" duration="23348000" />
<workItem from="1645523382970" duration="40541000" />
<workItem from="1645675072647" duration="1008000" />
<workItem from="1645676102200" duration="7490000" />
<workItem from="1645688411634" duration="12878000" />
</task>
<task id="LOCAL-00001" summary="just a bunch 'o stuff">
<created>1645422057851</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1645422057851</updated>
</task>
<task id="LOCAL-00002" summary="settings">
<created>1645489326191</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1645489326191</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
<option name="exactExcludedFiles">
<list>
<option value="$PROJECT_DIR$/apps/desktop/src/index.d.ts" />
</list>
</option>
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
<component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="just a bunch 'o stuff" />
<MESSAGE value="settings" />
<MESSAGE value="settings via react router" />
<MESSAGE value="- tcp listener WIP&#10;- better settings" />
<option name="LAST_COMMIT_MESSAGE" value="- tcp listener WIP&#10;- better settings" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />
<select />
</component>
</project>

1
.npmrc
View file

@ -1 +0,0 @@
engine-strict = true

4
Cargo.lock generated
View file

@ -6509,7 +6509,7 @@ dependencies = [
]
[[package]]
name = "sdcorelib"
name = "sdcore"
version = "0.1.0"
dependencies = [
"anyhow",
@ -7022,7 +7022,7 @@ dependencies = [
"once_cell",
"rebind",
"ring 0.17.0-alpha.11",
"sdcorelib",
"sdcore",
"serde",
"serde_json",
"sha256",

View file

@ -2,5 +2,5 @@
members = [
"apps/debug",
"apps/desktop/src-tauri",
"packages/core"
"core"
]

View file

@ -83,7 +83,7 @@ This project is using what I'm calling the **"PRRTT"** stack (Prisma, Rust, Reac
- Tauri allows us to create a pure Rust native OS webview, without the overhead of your average Electron app. This brings the bundle size and average memory usage down dramatically. It also contributes to a more native feel, especially on macOS due to Safari's close integration with the OS.
- ...
Spacedrive's core (`sdcorelib`) is written in pure Rust, using the Tauri framework to embed a React app in a native browser window for UI. The mobile app is React Native, with `sdcorelib` embedded as a native binary.
Spacedrive's core (`sdcore`) is written in pure Rust, using the Tauri framework to embed a React app in a native browser window for UI. The mobile app is React Native, with `sdcore` embedded as a native binary.
## Apps
- `desktop`: a [Tauri](https://nextjs.org) app
@ -93,11 +93,11 @@ Spacedrive's core (`sdcorelib`) is written in pure Rust, using the Tauri framewo
## Packages
All TypeScript packages are compiled automatically using Turborepo.
- `core`: the [Rust]() core logic library, referred to internally as `sdcorelib`
- `core`: the [Rust]() core logic library, referred to internally as `sdcore`
- `state`: the [TypeScript]() core logic library
- `ui`: a [React Native]() / [RNW]() component library
- `config`: `eslint` configurations (includes `eslint-config-next`, `eslint-config-prettier` and all `tsconfig.json` configs used throughout the monorepo
- `native-macos`: a [Swift]() native binary
- `macos`: a [Swift]() native binary
- `native-ios`: a [Swift]() native binary
- `native-windows`: a [C#]() native binary
- `native-android`: a [Kotlin]() native binary

View file

@ -10,4 +10,4 @@ anyhow = "1.0.56"
data-encoding = "2.3.2"
ring = "0.16.20"
sha256 = "1.0.3"
# sdcorelib = { path = "../../packages/core" }
# sdcore = { path = "../../packages/core" }

View file

@ -34,7 +34,7 @@
"@radix-ui/react-dialog": "^0.1.5",
"@radix-ui/react-slider": "^0.1.4",
"@sd/core": "*",
"@sd/state": "*",
"@sd/client": "*",
"@sd/ui": "*",
"@tauri-apps/api": "^1.0.0-beta.5",
"@types/pretty-bytes": "^5.2.0",

View file

@ -16,7 +16,7 @@ swift-rs = "0.2.3"
[dependencies]
# Project dependencies
tauri = { version = "1.0.0-rc.6", features = ["api-all", "macos-private-api"] }
sdcorelib = { path = "../../../packages/core" }
sdcore = { path = "../../../core" }
# tauri-plugin-shadows = { git = "https://github.com/tauri-apps/tauri-plugin-shadows", features = ["tauri-impl"] }
# Universal Dependencies

View file

@ -5,7 +5,7 @@ fn main() {
// std::env::set_var("CARGO_CFG_TARGET_ARCH", "arm64");
// link_swift();
// link_swift_package("swift-lib", "../../../packages/native-macos/");
// link_swift_package("swift-lib", "../../../packages/macos/");
tauri_build::build();
}

View file

@ -1,6 +1,6 @@
// // DEPRECATE EVERYTHING IN THIS FILE
// use anyhow::Result;
// use sdcorelib::{
// use sdcore::{
// file::{indexer, retrieve, retrieve::Directory, watcher::watch_dir},
// state::{client, client::ClientState},
// sys,

View file

@ -1,6 +1,6 @@
use std::time::{Duration, Instant};
use sdcorelib::{ClientCommand, ClientQuery, Core, CoreController, CoreEvent, CoreResponse};
use sdcore::{ClientCommand, ClientQuery, Core, CoreController, CoreEvent, CoreResponse};
use tauri::api::path;
use tauri::Manager;
mod menu;

View file

@ -3,13 +3,13 @@ import { CogIcon, EyeOffIcon, PlusIcon, ServerIcon } from '@heroicons/react/soli
import { appWindow } from '@tauri-apps/api/window';
import clsx from 'clsx';
import { CirclesFour, EjectSimple, MonitorPlay, Planet } from 'phosphor-react';
import React, { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import { NavLink, NavLinkProps } from 'react-router-dom';
import { TrafficLights } from '../os/TrafficLights';
import { Button } from '../primitive';
import { Dropdown } from '../primitive/Dropdown';
import { DefaultProps } from '../primitive/types';
import { useBridgeQuery } from '@sd/state';
import { useBridgeQuery } from '@sd/client';
import { platform } from '@tauri-apps/api/os';
interface SidebarProps extends DefaultProps {}

View file

@ -1,7 +1,7 @@
import { useEffect } from 'react';
import { emit, listen, Event } from '@tauri-apps/api/event';
// import { useExplorerStore } from '../store/explorer';
import { CoreEvent } from '@sd/core';
import { CoreEvent } from '../../../../core';
import { useQuery, useQueryClient } from 'react-query';
export function useCoreEvents() {

View file

@ -3,8 +3,8 @@ import ReactDOM from 'react-dom';
import App from './App';
import './style.css';
import { ClientCommand, ClientQuery } from '@sd/core';
import { BaseTransport, setTransport } from '@sd/state';
import { ClientCommand, ClientQuery } from '../../../core';
import { BaseTransport, setTransport } from '@sd/client';
import { invoke } from '@tauri-apps/api';
// bind state to core via Tauri

View file

@ -1,4 +1,4 @@
import { useBridgeQuery } from '@sd/state';
import { useBridgeQuery } from '@sd/client';
import React from 'react';
import ReactJson from 'react-json-view';
import FileItem from '../components/file/FileItem';

View file

@ -7,7 +7,7 @@ import Listbox from '../../components/primitive/Listbox';
import ReactJson from 'react-json-view';
import Slider from '../../components/primitive/Slider';
import { useBridgeCommand, useBridgeQuery } from '@sd/state';
import { useBridgeCommand, useBridgeQuery } from '@sd/client';
export default function GeneralSettings() {
const { data: volumes } = useBridgeQuery('SysGetVolumes');

View file

@ -1,5 +1,5 @@
[package]
name = "sdcorelib"
name = "sdcore"
version = "0.1.0"
description = "The next gen private virtual filesystem."
authors = ["NerdHouse, Inc.", "Jamie Pine"]

Some files were not shown because too many files have changed in this diff Show more