npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

file-over-app

v0.0.1

Published

File over App package

Downloads

2

Readme

GitHub stars GitHub license GitHub issues GitHub pull requests

Overview

file-over-app embodies a philosophy prioritizing enduring digital artifacts over transient application experiences. In a digital era dominated by ephemeral software and fleeting data ownership, file-over-app stands as a beacon for longevity, readability, and user control. Inspired by the lasting impact of ancient hieroglyphs and the timeless nature of physical artifacts, file-over-app champions the creation of digital files in formats that are easily accessible, open, and free from the constraints of proprietary systems.

At its core, file-over-app leverages the Web API's client-side filesystem capabilities to empower web frontends with direct access to documents from the client's filesystem. This approach envisions a future where private user data resides solely on the user's local system, in formats such as .md and JSON Canvas. These formats ensure durability, interoperability, and user-friendly access, laying the groundwork for a digital legacy that transcends generations.

Features

  • Client-Side File System Access: Utilize the modern Web File System API to directly interact with files on the user's local system.
  • User Control and Ownership: Give users unparalleled control over their data, enabling them to manage, store, and access their files without reliance on external cloud services.
  • Support for User-Friendly Formats: Emphasize the use of .md (Markdown) and JSON Canvas formats, ensuring data is stored in open, easily retrievable formats.

Getting Started

To integrate file-over-app into your project, ensure you have a modern web development environment ready. This package is designed for use in web applications capable of leveraging client-side JavaScript.

Installation as npm package

pnpm install file-over-app

Installation locally and build

git clone [email protected]:simonorzel26/file-over-app.git
pnpm install
pnpm build

Usage

import {
  selectFile,
  verifyPermission,
  removeEntry,
  openDatabase,
  saveFileData,
  getFileData,
  deleteFileData,
  removeAllFileData,
  readFile
} from 'file-over-app';

// Example: Opening a database
async function initializeDatabase() {
  const dbName = 'MyAppDB';
  const dbVersion = 1; // Specify your database version
  const db = await openDatabase(dbName, dbVersion);
  console.log('Database opened:', db);
}

// Example: Saving file data to the database
async function saveDataToFile(db, data) {
  await saveFileData(db, data);
  console.log('Data saved to file');
}

// Example: Retrieving file data by ID
async function fetchDataFromFile(db, id) {
  const data = await getFileData(db, id);
  console.log('Data fetched:', data);
}

// Example: Deleting file data
async function deleteDataFromFile(db, id) {
  await deleteFileData(db, id);
  console.log('Data deleted');
}

// Example: Clearing all file data
async function clearAllFileData(db) {
  await removeAllFileData(db);
  console.log('All file data cleared');
}

// Example: Selecting a file
async function handleFileSelection() {
  const fileHandle = await selectFile();
  console.log(fileHandle);
}

// Example: Verifying permission for file operation
async function handlePermissionVerification(fileHandle) {
  const hasPermission = await verifyPermission(fileHandle, true);
  console.log('Permission:', hasPermission);
}

// Example: Removing a file
async function handleFileRemoval(fileHandle) {
  await removeEntry(fileHandle);
  console.log('File removed');
}

// Example: Reading a file
async function handleFileReading(fileHandle) {
  const fileContent = await readFile(fileHandle);
  console.log('File content:', fileContent);
}

Current Functionalities

  • File Selection: Prompt users to select files directly from their local filesystem.
  • Permission Verification: Check and request permissions for read or write operations on the selected files.
  • File Removal: Allow for the deletion of files with the user's consent.

Current Limitations

  • User Permissions: Due to security considerations, web applications must explicitly request access from the user for each file operation, potentially affecting user experience.
  • Browser Compatibility: The underlying Web File System API has varying levels of support across browsers, which may limit functionality on unsupported platforms.

Future Directions

As file-over-app evolves, we aim to expand its capabilities and improve upon its foundation, guided by the principle that the value of digital files should outlast the applications used to create them. We are committed to enhancing format support, streamlining user interactions, and ensuring that your digital artifacts can be a legacy for future generations.

Contributing

We welcome contributions from the community. Whether it's improving the codebase, proposing new features, or reporting bugs, your input is invaluable in making file-over-app a robust tool for digital preservation. Please visit our GitHub repository at file-over-app GitHub to contribute.

License

file-over-app is open source, licensed under the MIT License. We believe in the freedom to use, modify, and distribute software, and we encourage you to join us in this endeavor to make digital data truly durable and user-controlled.