Skip to main content

Prerequisites

Before you begin development, ensure you have the following installed:
Install Node.js version 18.0 or higher:
Download from nodejs.org if you need to upgrade.
Ensure Git is installed for version control:

Development Installation

1. Fork and Clone

1

Fork the repository

2

Clone your fork

3

Add upstream remote

2. Install Dependencies

Install all project dependencies:
This will install both runtime and development dependencies needed for the project.

3. Environment Configuration

  1. Copy the example environment file:
  1. Configure for development:
Create a test photos directory for development:
Add some test images to verify your setup works correctly.

Development Workflow

Running in Development Mode

1

Start the development server

This starts the server with hot reloading and development logging enabled.
2

Access the application

Open your browser to:
3

Test photo upload

Navigate to the admin panel and test uploading photos to ensure everything works.

Available Scripts

Development Guidelines

Code Style

  • Use ES6+ features and async/await
  • Follow ESLint configuration
  • Use meaningful variable and function names
  • Add JSDoc comments for functions
  • Follow Material Design principles
  • Use CSS custom properties for theming
  • Mobile-first responsive design
  • BEM naming convention for CSS classes

Git Workflow

1

Create feature branch

2

Make your changes

Develop your feature with frequent commits:
3

Keep updated

Regularly sync with upstream:
4

Push and create PR

Then create a Pull Request on GitHub.

Testing

Running Tests

Writing Tests

Create tests in the tests/ directory:

Debugging

Use Node.js debugger or VS Code:
  • Use browser Developer Tools
  • Check console for JavaScript errors
  • Use Network tab to inspect API calls
  • Test responsive design in device emulation

Common Development Tasks

Add API Endpoint

Create new routes in src/routes/ and register them in the main server file.

Modify UI

Update HTML templates and CSS in the public/ directory.

Add Configuration

Add new environment variables to .env.example and document them.

Optimize Images

Modify image processing utilities in src/utils/imageProcessor.js.

Performance Considerations

  • Image Processing: Use efficient libraries like Sharp for image manipulation
  • Caching: Implement proper caching strategies for processed images
  • Memory Usage: Monitor memory usage with large image collections
  • Network: Optimize image delivery with appropriate compression

Need Help?

Stuck on something? Check the contributing guidelines or open an issue on GitHub for help from the community.