Skip to content

Commit 1bd6ea1

Browse files
authored
Merge pull request #13 from appwrite/chore-test-templates
Site templates for react-admin and Formspree
2 parents 35025a0 + dd52ef3 commit 1bd6ea1

File tree

120 files changed

+15544
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+15544
-0
lines changed

react/formspree/.env.example

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Formspree configuration
2+
# Replace 'xxxxxxxxxxxx' with your actual form ID from formspree.io
3+
VITE_FORMSPREE_FORM_ID=xxxxxxxxxxxx
4+
5+
# Example:
6+
# VITE_FORMSPREE_FORM_ID=xrgkpqld
7+
8+
# Instructions:
9+
# 1. Copy this file and rename it to '.env'
10+
# 2. Replace the placeholder value with your actual Formspree form ID
11+
# 4. Restart your development server after making changes to .env

react/formspree/.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
.history
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
25+
26+
.env
27+
.env.local
28+
.env.*.local

react/formspree/README.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
# Job Application Form with Formspree
2+
3+
A modern, responsive job application form built with React, Vite, and Tailwind CSS, integrated with Formspree for form submissions.
4+
5+
## Features
6+
7+
- 📝 Clean and professional job application form
8+
- ⚡ Built with Vite for fast development
9+
- 🔒 Secure form submissions via Formspree
10+
- ✨ Real-time form validation
11+
12+
## Prerequisites
13+
14+
Before you begin, ensure you have the following installed:
15+
- Node.js (v14 or higher)
16+
- npm or yarn
17+
- A Formspree account and form ID
18+
19+
## Quick Start
20+
21+
1. Clone the repository:
22+
```bash
23+
git clone https://github.com/yourusername/formspree-job-application-form.git
24+
cd formspree-job-application-form
25+
```
26+
27+
2. Install dependencies:
28+
```bash
29+
npm install
30+
# or
31+
yarn install
32+
```
33+
34+
3. Configure environment variables:
35+
- Copy the example environment file:
36+
```bash
37+
cp env.example .env
38+
```
39+
- Update the `.env` file with your Formspree form ID:
40+
```env
41+
VITE_FORMSPREE_FORM_ID=your_form_id_here
42+
```
43+
44+
4. Start the development server:
45+
```bash
46+
npm run dev
47+
# or
48+
yarn dev
49+
```
50+
51+
5. Open your browser and visit `http://localhost:5173`
52+
53+
## Environment Variables
54+
55+
The following environment variables are required:
56+
57+
| Variable | Description | Example |
58+
|----------|-------------|---------|
59+
| VITE_FORMSPREE_FORM_ID | Your Formspree form ID | xrgkpqld |
60+
61+
## Project Structure
62+
63+
```
64+
formspree-job-application-form/
65+
├── src/
66+
│ ├── App.jsx # Main application component
67+
│ ├── App.css # Application styles
68+
│ ├── main.jsx # Entry point
69+
│ └── assets/ # Static assets
70+
├── public/ # Public assets
71+
├── .env # Environment variables (not in git)
72+
├── env.example # Example environment variables
73+
├── package.json # Project dependencies
74+
└── README.md # Project documentation
75+
```
76+
77+
## Development
78+
79+
### Available Scripts
80+
81+
- `npm run dev` - Start development server
82+
- `npm run build` - Build for production
83+
- `npm run preview` - Preview production build
84+
- `npm run lint` - Run ESLint
85+
- `npm run format` - Format code with Prettier
86+
87+
## Contributing
88+
89+
1. Fork the repository
90+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
91+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
92+
4. Push to the branch (`git push origin feature/amazing-feature`)
93+
5. Open a Pull Request
94+
95+
## License
96+
97+
This project is licensed under the MIT License
98+
99+
## Acknowledgments
100+
101+
- [React](https://reactjs.org/)
102+
- [Vite](https://vitejs.dev/)
103+
- [Tailwind CSS](https://tailwindcss.com/)
104+
- [Formspree](https://formspree.io/)

react/formspree/eslint.config.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
6+
export default [
7+
{ ignores: ['dist'] },
8+
{
9+
files: ['**/*.{js,jsx}'],
10+
languageOptions: {
11+
ecmaVersion: 2020,
12+
globals: globals.browser,
13+
parserOptions: {
14+
ecmaVersion: 'latest',
15+
ecmaFeatures: { jsx: true },
16+
sourceType: 'module',
17+
},
18+
},
19+
plugins: {
20+
'react-hooks': reactHooks,
21+
'react-refresh': reactRefresh,
22+
},
23+
rules: {
24+
...js.configs.recommended.rules,
25+
...reactHooks.configs.recommended.rules,
26+
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
27+
'react-refresh/only-export-components': [
28+
'warn',
29+
{ allowConstantExport: true },
30+
],
31+
},
32+
},
33+
]

react/formspree/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + React</title>
8+
</head>
9+
<body>
10+
<div id="root"></div>
11+
<script type="module" src="/src/main.jsx"></script>
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)