-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from foundersandcoders/integrate-resend
Beacon: Resend Edition
- Loading branch information
Showing
24 changed files
with
1,109 additions
and
266 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,4 @@ allcode.txt | |
*.sw? | ||
|
||
.env.* | ||
.env.development |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,104 @@ | ||
# React + TypeScript + Vite | ||
# Beacon | ||
|
||
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. | ||
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. | ||
|
||
Currently, two official plugins are available: | ||
## Table of Contents | ||
|
||
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh | ||
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh | ||
- [Table of Contents](#table-of-contents) | ||
- [Getting Started](#getting-started) | ||
- [Installation](#installation) | ||
- [Project Structure](#project-structure) | ||
- [Development](#development) | ||
- [Linting](#linting) | ||
- [Deployment](#deployment) | ||
- [GitHub Actions Workflow](#github-actions-workflow) | ||
- [Configuration](#configuration) | ||
- [Contributing](#contributing) | ||
- [License](#license) | ||
|
||
## Expanding the ESLint configuration | ||
## Getting Started | ||
|
||
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: | ||
To get started with Beacon, ensure you have the following prerequisites installed: | ||
|
||
- Configure the top-level `parserOptions` property like this: | ||
- Node.js (LTS version recommended) | ||
- npm (comes with Node.js) | ||
- Deno (for backend integration) | ||
|
||
```js | ||
export default tseslint.config({ | ||
languageOptions: { | ||
// other options... | ||
parserOptions: { | ||
project: ['./tsconfig.node.json', './tsconfig.app.json'], | ||
tsconfigRootDir: import.meta.dirname, | ||
}, | ||
}, | ||
}); | ||
### Installation | ||
|
||
Clone the repository and install the dependencies: | ||
|
||
```bash | ||
git clone https://github.com/yourusername/beacon.git | ||
cd beacon | ||
npm install | ||
``` | ||
|
||
- Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked` | ||
- Optionally add `...tseslint.configs.stylisticTypeChecked` | ||
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config: | ||
|
||
```js | ||
// eslint.config.js | ||
import react from 'eslint-plugin-react'; | ||
|
||
export default tseslint.config({ | ||
// Set the react version | ||
settings: { react: { version: '18.3' } }, | ||
plugins: { | ||
// Add the react plugin | ||
react, | ||
}, | ||
rules: { | ||
// other rules... | ||
// Enable its recommended rules | ||
...react.configs.recommended.rules, | ||
...react.configs['jsx-runtime'].rules, | ||
}, | ||
}); | ||
## Project Structure | ||
|
||
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). | ||
|
||
## Development | ||
|
||
To start the development server, run: | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
My notes: | ||
We have x2 components for subject picking and verb picking. | ||
The ones on the wizzard are the tiles style | ||
This will start a local server at `http://localhost:3000` where you can view the application. | ||
|
||
### Linting | ||
|
||
Ensure your code adheres to the project's style guidelines by running: | ||
|
||
```bash | ||
npm run lint | ||
``` | ||
|
||
## Deployment | ||
|
||
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. | ||
|
||
### GitHub Actions Workflow | ||
|
||
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 | ||
|
||
Configuration settings are managed through environment variables. Ensure you have a `.env` file in the root directory with the necessary variables: | ||
|
||
```ini | ||
VITE_API_URL=<your_backend_api_url> | ||
VITE_RESEND_KEY=<your_resend_key> | ||
``` | ||
|
||
## Contributing | ||
|
||
Contributions are welcome! Please follow these steps: | ||
|
||
1. Fork the repository. | ||
2. Create a new branch (`git checkout -b feature/your-feature`). | ||
3. Commit your changes (`git commit -am 'Add new feature'`). | ||
4. Push to the branch (`git push origin feature/your-feature`). | ||
5. Create a new Pull Request. | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Dev Notes | ||
|
||
## Alex's Notes | ||
|
||
- We have x2 components for subject picking and verb picking. | ||
- The ones on the wizzard are the tiles style |
Oops, something went wrong.