V-Gillet/PerriStock

โ˜… 0Forks 0TypeScriptGitHub โ†—Compare

README

Perristock ๐Ÿงต

A personal inventory management app for DMC embroidery threads, built with React Native and Expo.

๐Ÿ“ฑ About

Perristock helps you keep track of your embroidery thread collection. Features include:

  • ๐ŸŽจ Complete DMC Thread Database - Browse all 500+ DMC thread colors
  • ๐Ÿ“ฆ Stock Management - Track quantity and add notes for each thread
  • ๐Ÿ” Smart Search - Find threads by DMC number, name, or color
  • ๐Ÿ“Š Grid & List Views - Switch between layouts with a toggle, for tabs
  • ๐ŸŽจ Color Preview - See accurate thread colors at a glance

๐Ÿš€ Getting Started

Prerequisites

Installation

  1. Clone the repository:
git clone <your-repo-url>
cd perristock
  1. Install dependencies:
npm install
  1. Start the development server:
npm start
  1. Run on your device:
    • Android: Press a or scan QR code with Expo Go
    • iOS: Press i or scan QR code with Expo Go (iOS only)
    • Web: Press w

๐Ÿ“ฆ Building an APK for Android

This app is designed for personal use and manual distribution (no Play Store required).

Option 1: Using EAS Build (Recommended)

  1. Install EAS CLI globally:
npm install -g eas-cli
  1. Login to your Expo account:
eas login
  1. Configure the project (if not already done):
eas build:configure
  1. Build the APK:

For a preview/test build:

eas build --platform android --profile preview

For a production build:

eas build --platform android --profile production
  1. Download the APK:

Once the build completes, you'll receive a download link. You can also download it via:

eas build:list
eas build:download --platform android --latest

Option 2: Local Build (Advanced)

If you prefer to build locally without EAS:

  1. Install Android Studio and configure environment

  2. Prebuild the native project:

npx expo prebuild --platform android
  1. Build with Gradle:
cd android
./gradlew assembleRelease
  1. Find your APK at:
android/app/build/outputs/apk/release/app-release.apk

Distributing Your APK

  • Email/Messaging: Send the APK directly to users
  • Cloud Storage: Upload to Google Drive, Dropbox, or similar
  • Web Hosting: Host on your own server

Note: Users will need to enable "Install from Unknown Sources" in their Android settings.

๐Ÿ“ Configuration

Update Package Name

Before building, update the package name in app.json:

{
  "expo": {
    "android": {
      "package": "com.yourname.perristock"
    }
  }
}

๐Ÿ—‚๏ธ Project Structure

perristock/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ (tabs)/          # Main navigation tabs
โ”‚   โ”œโ”€โ”€ hooks/           # Custom React hooks
โ”‚   โ””โ”€โ”€ services/        # Database and business logic
โ”œโ”€โ”€ components/          # Reusable UI components
โ”œโ”€โ”€ constants/           # Colors and theme configuration
โ””โ”€โ”€ assets/             # Images and static files

๐Ÿ› ๏ธ Tech Stack

๐ŸŽจ Key Features Explained

Database Structure

  • dmc_threads: Reference table with all 500+ DMC threads
  • stock_threads: Your personal inventory linked to DMC reference

Color Palette

The app uses a warm, craft-inspired color scheme defined in constants/Colors.ts:

  • Primary: #734A1F (Brown)
  • Secondary: #B8956A (Tan)
  • Accent: #E6D5C3 (Cream)
  • Error: #C94D4D (Red)

Storage Location

Database file: perristock.db is stored locally on the device using Expo SQLite.

To export your database, you can add this utility in the database service:

import * as FileSystem from 'expo-file-system';
import * as Sharing from 'expo-sharing';

async exportDatabase() {
  const dbPath = `${FileSystem.documentDirectory}SQLite/perristock.db`;
  await Sharing.shareAsync(dbPath);
}

๐Ÿ“„ License

This is a personal project for managing embroidery thread inventory. Feel free to fork and adapt for your own use.

๐Ÿค Contributing

This is a personal project, but suggestions and improvements are welcome! Feel free to open an issue or submit a pull request.

๐Ÿ“ง Contact

For questions or support, please open an issue on GitHub.


Made with ๐Ÿงต for embroidery enthusiasts

Issues