mirror of https://github.com/docusealco/docuseal
This commit removes various visual elements like logos, banners, and buttons to create a cleaner and more focused user experience. It also adds context files for AI assistants to aid in development.pull/501/head
parent
799a7207f6
commit
c6eac5d543
@ -0,0 +1,137 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## Development Commands
|
||||
|
||||
### Starting the Application
|
||||
```bash
|
||||
# Start Rails server
|
||||
PORT=3001 bundle exec rails s -p 3001
|
||||
|
||||
# Start Webpack dev server (separate terminal)
|
||||
bundle exec ./bin/shakapacker-dev-server
|
||||
|
||||
# Or start both with foreman
|
||||
foreman start -f Procfile.dev
|
||||
```
|
||||
|
||||
### Database Operations
|
||||
```bash
|
||||
# Create and migrate database
|
||||
rails db:create db:migrate
|
||||
|
||||
# Reset database
|
||||
rails db:drop db:create db:migrate
|
||||
|
||||
# Run seeds
|
||||
rails db:seed
|
||||
```
|
||||
|
||||
### Testing
|
||||
```bash
|
||||
# Run all tests
|
||||
bundle exec rspec
|
||||
|
||||
# Run specific test file
|
||||
bundle exec rspec spec/path/to/test_spec.rb
|
||||
|
||||
# Run system tests with visible browser
|
||||
HEADLESS=false bundle exec rspec spec/system/
|
||||
|
||||
# Run tests with coverage
|
||||
COVERAGE=true bundle exec rspec
|
||||
```
|
||||
|
||||
### Code Quality
|
||||
```bash
|
||||
# Ruby linting
|
||||
bundle exec rubocop
|
||||
bundle exec rubocop -a # auto-correct
|
||||
|
||||
# JavaScript linting
|
||||
yarn eslint
|
||||
|
||||
# ERB linting
|
||||
bundle exec erblint --lint-all
|
||||
|
||||
# Security scanning
|
||||
bundle exec brakeman
|
||||
```
|
||||
|
||||
### Asset Management
|
||||
```bash
|
||||
# Install JavaScript dependencies
|
||||
yarn install
|
||||
|
||||
# Compile assets for production
|
||||
bundle exec rails assets:precompile
|
||||
|
||||
# Start webpack dev server
|
||||
bundle exec ./bin/shakapacker-dev-server
|
||||
```
|
||||
|
||||
## Application Architecture
|
||||
|
||||
### Core Domain Models
|
||||
- **Template**: PDF form templates with fields for signing/filling
|
||||
- **Submission**: Instance of a template being processed with specific submitters
|
||||
- **Submitter**: Individual who needs to fill/sign a document within a submission
|
||||
- **User**: System users (admins, team members) who manage templates and submissions
|
||||
- **Account**: Multi-tenant organization container
|
||||
|
||||
### Key Relationships
|
||||
- Templates belong to Accounts and have many Submissions
|
||||
- Submissions have many Submitters (signing parties)
|
||||
- Each Submitter has specific fields to complete
|
||||
- CompletedSubmitter and CompletedDocument track completion state
|
||||
|
||||
### Frontend Architecture
|
||||
- **Rails Views**: Server-rendered ERB templates with Turbo for interactivity
|
||||
- **Vue.js Components**: Used for complex interactive forms (template builder, submission forms)
|
||||
- **Stimulus**: Lightweight JavaScript controllers for DOM interactions
|
||||
- **Tailwind CSS**: Utility-first CSS framework with DaisyUI components
|
||||
|
||||
### Background Jobs (Sidekiq)
|
||||
- Document processing and PDF generation
|
||||
- Email notifications and reminders
|
||||
- Webhook deliveries
|
||||
- Search indexing
|
||||
|
||||
### File Storage
|
||||
- Uses Active Storage for file management
|
||||
- Supports local disk, AWS S3, Google Cloud, Azure storage
|
||||
- PDF processing with HexaPDF library
|
||||
- Image processing with ruby-vips
|
||||
|
||||
### API Structure
|
||||
- RESTful JSON API under `/api` namespace
|
||||
- API authentication via access tokens
|
||||
- Webhook system for real-time integrations
|
||||
- OpenAPI documentation in `docs/openapi.json`
|
||||
|
||||
## Key Configuration Files
|
||||
- `config/routes.rb`: Main routing configuration with API and web routes
|
||||
- `config/application.rb`: Rails application configuration
|
||||
- `shakapacker.yml`: JavaScript build configuration
|
||||
- `tailwind.config.js`: CSS framework configuration
|
||||
|
||||
## Development Environment
|
||||
- Ruby 3.4.2 required
|
||||
- Node.js 18 for asset compilation
|
||||
- SQLite for development (PostgreSQL supported)
|
||||
- Redis for background jobs
|
||||
- VIPS for image processing
|
||||
|
||||
## Testing Setup
|
||||
- RSpec for Ruby testing with FactoryBot fixtures
|
||||
- Capybara + Cuprite for system/integration tests
|
||||
- WebMock for HTTP request stubbing
|
||||
- Sidekiq testing utilities for background jobs
|
||||
|
||||
## Security Features
|
||||
- Devise for authentication with 2FA support
|
||||
- CanCanCan for authorization
|
||||
- PDF signature verification
|
||||
- Encrypted configuration storage
|
||||
- Rate limiting middleware
|
||||
@ -0,0 +1,34 @@
|
||||
|
||||
# DocuSeal Application Analysis
|
||||
|
||||
This document provides a comprehensive overview of the DocuSeal application, including its core functionality, technical stack, and key features.
|
||||
|
||||
## Core Functionality
|
||||
|
||||
* **Document Signing:** The primary purpose of DocuSeal is to facilitate the digital signing of documents. It allows users to upload PDF documents, add various form fields (signatures, dates, text, etc.), and send them to multiple recipients for signing.
|
||||
* **PDF Form Builder:** It includes a WYSIWYG (What You See Is What You Get) editor for creating and arranging form fields on a PDF document.
|
||||
* **User Management:** The application supports user accounts, allowing individuals and organizations to manage their documents and signing processes.
|
||||
* **Email Automation:** It uses SMTP to send automated emails for document invitations, notifications, and reminders.
|
||||
* **File Storage:** DocuSeal can store files on the local disk or integrate with cloud storage providers like AWS S3, Google Storage, and Azure Cloud.
|
||||
* **Security:** It provides features like PDF eSignature, signature verification, and user authentication (including two-factor authentication and SSO/SAML).
|
||||
* **Integrations:** The platform offers APIs and webhooks to integrate with other applications and services.
|
||||
|
||||
## Technical Stack
|
||||
|
||||
* **Backend:** Ruby on Rails
|
||||
* **Frontend:** JavaScript, Vue.js, and Hotwired/Turbo for a reactive user experience. It uses Shakapacker (a successor to Webpacker) for managing JavaScript assets.
|
||||
* **Database:** The `Gemfile` indicates support for PostgreSQL and SQLite. The local setup guide recommends SQLite for development and PostgreSQL for production.
|
||||
* **Background Jobs:** Sidekiq is used for processing background jobs, such as sending emails.
|
||||
* **Styling:** Tailwind CSS and DaisyUI are used for styling the user interface.
|
||||
|
||||
## Key Features from `routes.rb`
|
||||
|
||||
* **API:** A JSON API is available for managing users, submissions, templates, and other resources.
|
||||
* **Document Management:** Routes for creating, viewing, and managing document templates and submissions.
|
||||
* **User Authentication:** Devise is used for user authentication, including sessions, passwords, and invitations.
|
||||
* **Settings:** A comprehensive settings area allows users to configure their account, email, storage, security, and other preferences.
|
||||
* **Embedded Functionality:** The application supports embedding the signing form and document builder into other websites.
|
||||
|
||||
## Project Structure
|
||||
|
||||
The project follows a standard Ruby on Rails application structure, with controllers, models, views, and other components organized in their respective directories.
|
||||
@ -1,2 +1 @@
|
||||
<%= render 'shared/logo' %>
|
||||
<span>DocuSeal</span>
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
<a href="<%= root_path %>" class="mx-auto text-2xl md:text-3xl font-bold items-center flex space-x-3">
|
||||
<%= render 'shared/logo', class: 'w-9 h-9 md:w-12 md:h-12' %>
|
||||
<span><%= Docuseal.product_name %></span>
|
||||
</a>
|
||||
|
||||
Loading…
Reference in new issue