Beacon is a frontend application designed to work seamlessly with the LIFT-backend. It provides an intuitive interface for users to interact with various data-driven components, focusing on subject and verb selection for creating statements.
- Table of Contents
- Getting Started
- Project Structure
- Development
- Deployment
- Configuration
- Contributing
- License
To get started with Beacon, ensure you have the following prerequisites installed:
- Node.js (LTS version recommended)
- npm (comes with Node.js)
- Deno (for backend integration)
Clone the repository and install the dependencies:
git clone https://github.com/yourusername/beacon.git
cd beacon
npm install
The project is organized as follows:
- src/: Contains the main source code for the application.
- components/: React components used throughout the app.
- context/: Context providers for state management.
- api/: API calls to the backend.
- hooks/: Custom React hooks.
- lib/: Utility functions.
- data/: JSON files containing static data for the application.
- public/: Static files and assets.
- .github/: GitHub workflows for CI/CD.
- dist/: Build output directory (ignored in version control).
To start the development server, run:
npm run dev
This will start a local server at http://localhost:3000
where you can view the application.
Ensure your code adheres to the project's style guidelines by running:
npm run lint
Beacon is configured to deploy to Deno Deploy. The deployment process is automated using GitHub Actions. On every push to the main
branch, the application is built and deployed.
The deployment workflow is defined in .github/workflows/deploy.yml
. It includes steps to:
- Clone the repository
- Install Deno and Node.js
- Build the project
- Deploy to Deno
Configuration settings are managed through environment variables. Ensure you have a .env
file in the root directory with the necessary variables:
VITE_API_URL=<your_backend_api_url>
VITE_RESEND_KEY=<your_resend_key>
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/your-feature
). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.