Skip to content

AmanCrafts/CraftBook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

63 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Craftbook β€” A Dedicated Visual-First Platform for Artists

One-line tagline: Where craft meets community β€” a high-fidelity social space made for sketch artists, painters, and traditional creatives.


Project Structure

CraftBook/
β”œβ”€β”€ backend/                        # Express.js API server
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/                    # API layer (versioned)
β”‚   β”‚   β”‚   └── v1/
β”‚   β”‚   β”‚       └── index.js        # API v1 routes aggregator
β”‚   β”‚   β”œβ”€β”€ modules/                # Feature modules (domain-focused)
β”‚   β”‚   β”‚   β”œβ”€β”€ user/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ user.controller.js      # HTTP request handlers
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ user.service.js         # Business logic
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ user.repository.js      # Data access layer
β”‚   β”‚   β”‚   β”‚   └── user.routes.js          # Route definitions
β”‚   β”‚   β”‚   β”œβ”€β”€ post/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ post.controller.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ post.service.js
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ post.repository.js
β”‚   β”‚   β”‚   β”‚   └── post.routes.js
β”‚   β”‚   β”‚   └── upload/
β”‚   β”‚   β”‚       β”œβ”€β”€ upload.controller.js
β”‚   β”‚   β”‚       β”œβ”€β”€ upload.service.js
β”‚   β”‚   β”‚       └── upload.routes.js
β”‚   β”‚   β”œβ”€β”€ config/                 # Configuration files
β”‚   β”‚   β”‚   β”œβ”€β”€ index.js            # Main config
β”‚   β”‚   β”‚   β”œβ”€β”€ database.js         # Prisma client (Singleton)
β”‚   β”‚   β”‚   β”œβ”€β”€ supabase.js         # Supabase client
β”‚   β”‚   β”‚   └── multer.js           # File upload config
β”‚   β”‚   β”œβ”€β”€ middlewares/            # Express middlewares
β”‚   β”‚   β”‚   β”œβ”€β”€ error.middleware.js         # Error handling
β”‚   β”‚   β”‚   └── logger.middleware.js        # Request logging
β”‚   β”‚   β”œβ”€β”€ app.js                  # Express app configuration
β”‚   β”‚   └── server.js               # Server startup & graceful shutdown
β”‚   β”œβ”€β”€ prisma/                     # Database schema & migrations
β”‚   β”‚   β”œβ”€β”€ schema.prisma
β”‚   β”‚   └── migrations/
β”‚   β”œβ”€β”€ .env                        # Backend environment variables
β”‚   β”œβ”€β”€ package.json                # Backend dependencies
β”‚   └── README.md                   # Backend documentation
β”‚
└── frontend/                       # React Native mobile app
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ api/                    # API client layer
    β”‚   β”‚   β”œβ”€β”€ httpClient.js       # Fetch wrapper
    β”‚   β”‚   β”œβ”€β”€ user.api.js         # User API calls
    β”‚   β”‚   β”œβ”€β”€ post.api.js         # Post API calls
    β”‚   β”‚   β”œβ”€β”€ upload.api.js       # Upload API calls
    β”‚   β”‚   └── index.js            # API exports
    β”‚   β”œβ”€β”€ components/             # Reusable UI components
    β”‚   β”‚   β”œβ”€β”€ common/             # Generic components (Login, Register, PostCard)
    β”‚   β”‚   β”œβ”€β”€ layout/             # Layout components
    β”‚   β”‚   β”œβ”€β”€ feedback/           # Modals, alerts, toasts
    β”‚   β”‚   └── index.js
    β”‚   β”œβ”€β”€ config/                 # Configuration files
    β”‚   β”‚   β”œβ”€β”€ env.js              # Environment variables
    β”‚   β”‚   └── index.js            # Firebase & API config
    β”‚   β”œβ”€β”€ constants/              # App-wide constants
    β”‚   β”‚   β”œβ”€β”€ colors.js           # Color palette
    β”‚   β”‚   β”œβ”€β”€ apiEndpoints.js     # API endpoint URLs
    β”‚   β”‚   β”œβ”€β”€ routes.js           # Navigation route names
    β”‚   β”‚   └── index.js
    β”‚   β”œβ”€β”€ contexts/               # React Context API (future)
    β”‚   β”œβ”€β”€ hooks/                  # Custom React hooks (future)
    β”‚   β”œβ”€β”€ navigation/             # React Navigation setup
    β”‚   β”‚   β”œβ”€β”€ AppNavigator.js     # Root Stack Navigator
    β”‚   β”‚   β”œβ”€β”€ MainNavigator.js    # Bottom Tab Navigator
    β”‚   β”‚   └── index.js
    β”‚   β”œβ”€β”€ screens/                # All app screens (feature-based)
    β”‚   β”‚   β”œβ”€β”€ Auth/               # LoginScreen
    β”‚   β”‚   β”œβ”€β”€ Home/               # HomeScreen
    β”‚   β”‚   β”œβ”€β”€ Profile/            # ProfileScreen, CompleteProfileScreen
    β”‚   β”‚   └── Upload/             # UploadScreen
    β”‚   β”œβ”€β”€ services/               # Business logic services (future)
    β”‚   β”œβ”€β”€ theme/                  # Theme configuration (future)
    β”‚   β”œβ”€β”€ utils/                  # Utility functions (future)
    β”‚   β”œβ”€β”€ App.js                  # Root app component
    β”‚   └── index.js                # Entry point
    β”œβ”€β”€ assets/                     # Static assets
    β”œβ”€β”€ .env                        # Frontend environment variables
    β”œβ”€β”€ package.json                # Frontend dependencies
    β”œβ”€β”€ app.json                    # Expo configuration
    β”œβ”€β”€ index.js                    # Root entry (imports src/App.js)
    └── README.md                   # Frontend documentation

Quick Start Guide

Prerequisites

  • Node.js 18+ and npm
  • Expo CLI (for mobile development)
  • PostgreSQL (via Supabase)
  • Firebase account (for authentication)

Installation

  1. Clone the repository
git clone https://github.com/AmanCrafts/CraftBook.git
cd CraftBook
  1. Install backend dependencies
cd backend
npm install
  1. Install frontend dependencies
cd ../frontend
npm install
  1. Set up environment variables

Backend (backend/.env):

DATABASE_URL="postgresql://..."
SUPABASE_URL="https://your-project.supabase.co"
SUPABASE_ANON_KEY="your-anon-key"
SUPABASE_BUCKET_NAME="Images"
PORT=3000
NODE_ENV=development

Frontend (frontend/.env):

# Backend URL (use your computer's local IP for mobile devices)
EXPO_PUBLIC_API_URL=http://YOUR_LOCAL_IP:3000

Note: Replace YOUR_LOCAL_IP with your computer's IP address. Get it by running:

ifconfig | grep "inet " | grep -v 127.0.0.1
  1. Run Prisma migrations (in backend directory)
cd backend
npx prisma migrate dev
npx prisma generate
  1. Start the application

Backend (Terminal 1):

cd backend
npm run dev

Frontend (Terminal 2):

cd frontend
npx expo start --clear

Then scan the QR code with Expo Go app on your mobile device.

Available Scripts

Backend (run from /backend directory):

  • npm run dev - Run backend server with nodemon
  • npm start - Run backend server
  • npm test - Test database connection
  • npm run prisma:migrate - Run database migrations
  • npm run prisma:generate - Generate Prisma client
  • npm run prisma:studio - Open Prisma Studio

Frontend (run from /frontend directory):

  • npm start - Run Expo development server
  • npm run android - Run on Android device/emulator
  • npm run ios - Run on iOS device/simulator
  • npm run web - Run on web browser

1. Project Snapshot

Title: Craftbook β€” A Dedicated Visual-First Platform for Artists

Prepared by: Amanjeet – 2024-B-31102004

Elevator pitch: A mobile-first social app that preserves artwork quality, encourages meaningful critique through visual annotations, and helps artists sell and collaborate β€” without the noise of mainstream social networks.


2. Problem Statement β€” Why this app must exist

Many general-purpose social networks treat artworks as generic posts. This creates several problems:

  • Image degradation: High-quality artworks are heavily compressed and lose important detail.
  • Shallow engagement: "Likes" dominate while constructive critique is rare.
  • Poor discovery: Niche mediums and traditional techniques are hard to find.
  • Monetization friction: Artists struggle to list and manage commissions or sales.

Goal: Build a focused platform that preserves craft, encourages improvement, and enables monetization for artists.


3. Proposed Solution (Core Concept)

A mobile and web platform that:

  • Accepts lossless high-resolution uploads and supports time-lapse/process posts.
  • Enables annotation-based critique so feedback can be visual and actionable.
  • Provides in-app commerce for commissions, prints, and originals.
  • Surfaces artists by medium and skill β€” improving discovery and collaborations.

Key benefit: Artists get a curated environment designed around their workflow, not general social metrics.


4. Key Features (Clear, bite-sized items)

Currently Implemented βœ…

  1. Firebase Authentication β€” Secure email/password authentication with session persistence
  2. Complete Profile System β€” Enhanced modular profile with avatar, banner images, bio, and medium
  3. Image Upload to Supabase β€” Upload and manage profile pictures and banner images
  4. Modern Design System β€” Indigo/purple color palette with reusable Button and Input components
  5. Post Feed β€” View recent and popular artwork posts with filtering
  6. Profile Editing β€” Full-screen modal for updating profile information
  7. Responsive UI β€” Modern gradient headers, icons, and smooth transitions
  8. Explore & Discover β€” Search artwork by title, tags, or description with medium filter chips and a visual grid layout
  9. Process Stages & Time-lapse β€” Multi-step posts showing evolution from sketch to final with stage carousel and step indicators

Planned Features 🚧

  1. Lossless Upload & Zoomable Viewer β€” Upload high-res images with optional watermarking
  2. Annotation Critique Mode β€” Draw-on-image feedback (public or private) with versioned replies
  3. Commission & Storefront β€” Commission requests, direct sales, and order tracking
  4. Curated Challenges β€” Community-driven art events and challenges
  5. Collab Board & Matchmaking β€” Post project invites and find collaborators by skill and style

5. Target Users / Personas

Primary users:

  • Raj β€” The College Sketch Artist (age 20): Shares process to get critique and build a portfolio.
  • Sana β€” Professional Painter & Seller (age 28): Wants to sell originals and get commission requests.
  • Mr. Verma β€” Gallery Curator (age 42): Looks for emerging talent and commissions work.

Audience: Artists (traditional & digital), students, collectors, galleries, and art teachers.


6. Representative User Stories

  • As an artist, I want to upload a multi-stage post so viewers can follow my process.
  • As a peer, I want to annotate a painting to point out shading suggestions.
  • As a collector, I want to request a commission and securely pay within the app.
  • As a curator, I want to search by medium and skill level to discover new artists.

7. Technology Stack

Frontend

  • Framework: React Native (Expo SDK 54)
  • Navigation: React Navigation (Stack + Bottom Tabs)
  • Authentication: Firebase Auth with AsyncStorage persistence
  • State Management: React Context API (AuthContext)
  • UI Components: Custom components (Button, Input) with modern design
  • Icons: Ionicons from @expo/vector-icons
  • Gradients: expo-linear-gradient
  • Image Handling: expo-image-picker

Backend

  • Runtime: Node.js with Express.js
  • Database: PostgreSQL (Supabase)
  • ORM: Prisma
  • Image Storage: Supabase Storage
  • Architecture: Modular repository pattern

Current Stack Highlights

  • Modern indigo/purple design system
  • Modular profile architecture (6 reusable components)
  • Image upload with quality preservation
  • Real-time authentication state management

Future Additions

  • Realtime: Socket.IO or Firebase Realtime
  • Media tools: Sharp for image processing
  • Payments: Stripe / Razorpay
  • Search: Algolia or ElasticSearch
  • CI/CD: Docker, GitHub Actions

8. MVP β€” What we must deliver first

MVP Scope (must-haves):

  • Signup / Login and artist profile
  • Upload high-res artwork with multi-image posts
  • Zoomable viewer and basic watermark
  • Public comments + simple annotation feedback
  • Explore by medium and basic search
  • Commission request form (sandboxed payment)

MVP Success criteria:

  • Able to upload and view high-res art without perceptible quality loss.
  • Users can leave at least 10 annotations across 5 different artworks.
  • Commission flow completes end-to-end in a sandbox.

9. Timeline & Milestones (10-week plan)

Week Milestone
1–2 Research, UX wireframes, user flows, design system
3–4 Backend models, auth, media storage, DB schema
5–6 Mobile feed, upload flow, zoomable viewer
7 Annotation layer, real-time updates, messaging
8 Commission flow & payment sandbox integration
9 Testing (QA), performance tuning for media
10 Deployment, demo build, documentation

10. UI / Navigation β€” Quick flow

  1. Onboarding β†’ Choose art type & interests
  2. Home Feed β†’ Infinite scroll of curated and followed artists
  3. Post View β†’ Full-res viewer, comments, and Critique toggle
  4. Upload β†’ Select images/video β†’ add stages, tags, price
  5. Discover β†’ Filter by medium, challenges, and trending
  6. Profile β†’ Portfolio, store, reviews, collab board

11. Measurements of Success (KPIs)

  • DAU/MAU of artists and collectors
  • Avg time spent on a post (longer indicates deeper engagement)
  • Number of annotation critiques per week
  • Commission conversion rate (requests β†’ paid orders)
  • Retention at 7/30/90 days

12. Risks & Mitigations

  • Risk: Large uploads degrade performance. Mitigation: Server-side image optimization + progressive loading.
  • Risk: Abuse and copyright infringement. Mitigation: Watermarking, report flows, and moderation tools.
  • Risk: Payment disputes. Mitigation: Escrow-style flow and dispute resolution guidelines.

13. Next Steps (Short checklist)

  • Create 6 wireframe screens (Onboarding, Home, Post View, Upload, Discover, Profile)
  • Build backend models and media pipeline
  • Implement annotation prototype
  • Integrate sandbox payments for commissions

14. Deliverables

  • Wireframes (Figma/PNG) β€” optional next step
  • Mobile & backend source code (MVP)
  • Demo video & deployment guide

15. Additional Considerations

  • User Privacy: Implement robust privacy settings for artists to control who can view their work.
  • Content Moderation: Develop guidelines and tools for community moderation to maintain a positive environment.
  • Scalability: Plan for scaling the platform to accommodate a growing user base and increasing media uploads.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors