Skip to content

archethic-foundation/archethic-foundation.github.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archethic Website

A Laravel-based web application for the Archethic Foundation. This project uses PHP 8.3, Laravel, and Node.js (with Vite) to deliver a modern development experience. Whether you’re contributing to the codebase or deploying it for production, this guide will help you get started.

Table of Contents

  1. Prerequisites
  2. Installation
  3. Configuration
  4. Running the Application
  5. Running Tests
  6. Adding a page
  7. Adding a redirection
  8. Deploying production
  9. Docker (Optional)
  10. License

Prerequisites

  • PHP 8.3
  • Composer
  • Node.js (latest LTS preferred)
  • npm or yarn
  • MySQL or SQLite (or any other database supported by Laravel)

Note: If you don’t have all these installed locally, you can skip manual setup and use the optional Docker configuration described in Docker (Optional).


Installation

  1. Clone the repository:

    git clone https://github.com/archethic-foundation/archethic-laravel.git
    cd archethic-laravel
  2. Install PHP dependencies:

    composer install
  3. Install JavaScript dependencies:

    npm install

    Or if you prefer yarn:

    yarn
  4. Copy the example environment file and configure it:

    cp .env.example .env
    • Database: Set your database credentials in the .env file.
    • App URL: Update APP_URL to match your local environment (e.g. http://localhost:8000).
    • Other settings: Configure mail, caching, etc., as needed.
  5. Generate the application key:

    php artisan key:generate
  6. Run database migrations:

    php artisan migrate

    If you are using SQLite, just ensure you have a database/database.sqlite file and update your .env accordingly.


Configuration

  • Environment Variables: All major settings (database, caching, mail, etc.) are controlled via .env. For production, be sure to set APP_ENV=production, APP_DEBUG=false, and secure any other sensitive values.
  • Logging: Laravel logs to storage/logs by default. Check your .env for log settings (e.g., LOG_CHANNEL).

Running the Application

  1. Start the Laravel development server:
    composer run dev
    By default, this will serve your application at http://127.0.0.1:8000.

Docker (Optional)

If you prefer running everything in Docker containers, we have a Docker Compose setup that handles PHP, queue workers, the scheduler, and more. This ensures a consistent environment for all developers and simplifies deployment.

  1. Install Docker and Docker Compose (MacOS users: OrbStack is the way)
  2. Copy or adapt the docker-compose.dev.yml from the repository.
  3. Build and start containers:
    docker-compose -f docker-compose.dev.yml up -d

Running Tests

  1. Run static analysis (PHPStan):
    ./vendor/bin/phpstan analyse --memory-limit=2G
  2. Run automated tests (Pest):
    php artisan test
    This will execute your unit and feature tests, providing a summary of the results.

Adding a page

If you want to add a page which is not references by any hyperlink, you will have to export it explicitely.

To do so, edit config/export.php. Add your file in the paths array.

Adding a redirection

If you need to redirect one URL to another, you must duplicate the page. This is the simplest solution becaues GitHub pages does not support redirection setup.

To do so, edit .github/workflows/deploy.yaml. Add a cp command in the # Simulate redirections '-_- section.

Deploying production

Website has been hitorically created with Laravel 11. For hosting simplicity, we convert it to a static website before publishing it to GitHub Pages.

To deploy, simply push your changes to the main branch. This will trigger the deploy GitHub Action.

License

This project is open-sourced software licensed under the MIT license.


Questions or Feedback?

  • Website: archethic.net
  • GitHub Issues: Please open a ticket if you spot a bug or want to request a feature.
  • Pull Requests: Contributions are welcome! Fork this repo, make your changes, and submit a PR.

Happy coding!

About

website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •