-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename instances of thundernest to thunderbird. (#163)
- Loading branch information
1 parent
8725a9e
commit b442067
Showing
2 changed files
with
125 additions
and
125 deletions.
There are no files selected for viewing
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,124 +1,124 @@ | ||
# Thunderbird Appointment | ||
|
||
Invite others to grab times on your calendar. Choose a date. Make appointments as easy as it gets. | ||
|
||
## Get started | ||
|
||
You can either build preconfigured docker containers (database, backend and frontend) or manually set up the application. A more detailed documentation can befound in the [docs folder](./docs/README.md). | ||
|
||
### With Docker | ||
|
||
```bash | ||
git clone https://github.com/thundernest/appointment | ||
cd appointment | ||
docker-compose up -d --build | ||
``` | ||
|
||
A MySQL database will be accessible via `localhost:3306` with username and password set to: `tba` | ||
|
||
To init database or run migrations, the backend offers a cimple CLI interface: | ||
|
||
```bash | ||
run-command update-db | ||
``` | ||
|
||
### Manual Setup | ||
|
||
Make sure to have the following prerequisites available: | ||
|
||
```plain | ||
Python >= 3.10 | ||
Node.js >= 16.0 | ||
``` | ||
|
||
Run application for development with hot reloading backend and frontend: | ||
|
||
1. Get the application data | ||
|
||
```bash | ||
git clone https://github.com/thundernest/appointment | ||
``` | ||
|
||
2. Install, configure and run python backend (it's recommended to do this in a virtual environment) | ||
```bash | ||
cd appointment | ||
pip install -r backend/requirements.txt | ||
touch backend/src/appointment.db # when using sqlite | ||
cp backend/.env.example backend/.env # add your own configuration here | ||
uvicorn --factory backend.src.appointment.main:server --host 0.0.0.0 --port 5000 | ||
``` | ||
You can now access the backend at [localhost:5000](http://localhost:5000). | ||
3. Install and run vue frontend in a second bash | ||
```bash | ||
cd frontend | ||
yarn install | ||
yarn serve | ||
``` | ||
You can now access the frontend at [localhost:8080](http://localhost:8080). | ||
4. (optional) Run database migrations | ||
```bash | ||
cd backend | ||
cp alembic.ini.example alembic.ini # add your own configuration here | ||
alembic init migrations # init migrations once | ||
alembic current # check database state | ||
alembic upgrade head # migrate to latest state | ||
alembic revision -m "create ... table" # create a new migration | ||
``` | ||
## Testing | ||
To run tests, first install Pytest | ||
```bash | ||
pip install pytest httpx | ||
``` | ||
Create an Auth0 test user and add the credentials of that user to `AUTH0_TEST_USER` and `AUTH0_TEST_PASS` in your `.env`. Then `cd` into the project root und simply run | ||
```bash | ||
pytest | ||
``` | ||
Note: Since tests include endpoints that trigger mail sending, there must be a running smtp server on your testing system. You can simply run the Python built in server (according to your environment configuration): | ||
```bash | ||
python -m smtpd -n -c DebuggingServer localhost:25 | ||
``` | ||
## Contributing | ||
Contributions are very welcome. Please lint/format code before creating PRs. | ||
### Backend | ||
Backend is formatted using Ruff and Black. | ||
```bash | ||
pip install ruff | ||
pip install black | ||
``` | ||
Commands (from git root) | ||
```bash | ||
ruff backend | ||
black backend | ||
``` | ||
### Frontend | ||
Frontend is formatted using ESlint with airbnb rules. | ||
Commands (from /frontend) | ||
```bash | ||
yarn run lint | ||
yarn run lint --fix | ||
``` | ||
# Thunderbird Appointment | ||
|
||
Invite others to grab times on your calendar. Choose a date. Make appointments as easy as it gets. | ||
|
||
## Get started | ||
|
||
You can either build preconfigured docker containers (database, backend and frontend) or manually set up the application. A more detailed documentation can befound in the [docs folder](./docs/README.md). | ||
|
||
### With Docker | ||
|
||
```bash | ||
git clone https://github.com/thunderbird/appointment | ||
cd appointment | ||
docker-compose up -d --build | ||
``` | ||
|
||
A MySQL database will be accessible via `localhost:3306` with username and password set to: `tba` | ||
|
||
To init database or run migrations, the backend offers a cimple CLI interface: | ||
|
||
```bash | ||
run-command update-db | ||
``` | ||
|
||
### Manual Setup | ||
|
||
Make sure to have the following prerequisites available: | ||
|
||
```plain | ||
Python >= 3.10 | ||
Node.js >= 16.0 | ||
``` | ||
|
||
Run application for development with hot reloading backend and frontend: | ||
|
||
1. Get the application data | ||
|
||
```bash | ||
git clone https://github.com/thunderbird/appointment | ||
``` | ||
|
||
2. Install, configure and run python backend (it's recommended to do this in a virtual environment) | ||
```bash | ||
cd appointment | ||
pip install -r backend/requirements.txt | ||
touch backend/src/appointment.db # when using sqlite | ||
cp backend/.env.example backend/.env # add your own configuration here | ||
uvicorn --factory backend.src.appointment.main:server --host 0.0.0.0 --port 5000 | ||
``` | ||
You can now access the backend at [localhost:5000](http://localhost:5000). | ||
3. Install and run vue frontend in a second bash | ||
```bash | ||
cd frontend | ||
yarn install | ||
yarn serve | ||
``` | ||
You can now access the frontend at [localhost:8080](http://localhost:8080). | ||
4. (optional) Run database migrations | ||
```bash | ||
cd backend | ||
cp alembic.ini.example alembic.ini # add your own configuration here | ||
alembic init migrations # init migrations once | ||
alembic current # check database state | ||
alembic upgrade head # migrate to latest state | ||
alembic revision -m "create ... table" # create a new migration | ||
``` | ||
## Testing | ||
To run tests, first install Pytest | ||
```bash | ||
pip install pytest httpx | ||
``` | ||
Create an Auth0 test user and add the credentials of that user to `AUTH0_TEST_USER` and `AUTH0_TEST_PASS` in your `.env`. Then `cd` into the project root und simply run | ||
```bash | ||
pytest | ||
``` | ||
Note: Since tests include endpoints that trigger mail sending, there must be a running smtp server on your testing system. You can simply run the Python built in server (according to your environment configuration): | ||
```bash | ||
python -m smtpd -n -c DebuggingServer localhost:25 | ||
``` | ||
## Contributing | ||
Contributions are very welcome. Please lint/format code before creating PRs. | ||
### Backend | ||
Backend is formatted using Ruff and Black. | ||
```bash | ||
pip install ruff | ||
pip install black | ||
``` | ||
Commands (from git root) | ||
```bash | ||
ruff backend | ||
black backend | ||
``` | ||
### Frontend | ||
Frontend is formatted using ESlint with airbnb rules. | ||
Commands (from /frontend) | ||
```bash | ||
yarn run lint | ||
yarn run lint --fix | ||
``` |
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