-
Notifications
You must be signed in to change notification settings - Fork 1
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 #435 from lexicongovernance/develop
v2.5.5
- Loading branch information
Showing
89 changed files
with
9,585 additions
and
3,832 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,3 +1,9 @@ | ||
DB_CONNECTION_URL=postgresql://postgres:secretpassword@localhost:5432 | ||
# DATABASE CONNECTION | ||
DATABASE_HOST="localhost" | ||
DATABASE_PORT="5432" | ||
DATABASE_USER="postgres" | ||
DATABASE_PASSWORD="secretpassword" | ||
DATABASE_NAME="postgres" | ||
|
||
PORT=8080 | ||
COOKIE_PASSWORD=YourPasswortMustBeAtLeast32Charc |
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
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,30 @@ | ||
## Getting started | ||
|
||
After following the steps in the [self-host](./self-host.md), you can start using the tool in action by following these steps: | ||
|
||
1. Run seed data to populate the database with initial data: | ||
|
||
```bash | ||
pnpm seed | ||
``` | ||
|
||
This command will create an event with cycles and dummy questions. | ||
|
||
## How to use the tool | ||
|
||
1. Login to the app by navigating to `http://localhost:3000` in your browser. | ||
2. Register for an event | ||
3. Accept the registration by running `pnpm db:studio` and updating the registration status to `APPROVED`. | ||
|
||
You can now start using the tool to create and answer questions, view the results, and more! | ||
|
||
## FAQ | ||
|
||
### How do I create a new event? | ||
|
||
1. Create a new row in the `events` table in the database. A event can have many cycles, each cycle represents a round of questions. | ||
2. Create group categories in the `group_categories` table in the database. A group category can have many groups. At least one group category must be created with the boolean `required` set to `true`. | ||
3. Create multiple new rows in the `groups` table in the database associated to the group category created in the previous step. A group can have many users. | ||
4. Create a new row in the `cycles` table in the database. Make sure to set correctly the start_at and end_at time. A cycle can have many questions. | ||
5. Create a new row in the `questions` table in the database. A question can have many options. | ||
6. Create a new row in the `options` table in the database. An option belongs to a question. |
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,35 @@ | ||
# Self-Hosting an Event | ||
|
||
To self-host the app, you will need to follow these steps: | ||
|
||
1. Clone the frontend repository from [GitHub](https://github.com/lexicongovernance/pluraltools-frontend). | ||
2. Install Docker and Docker Compose on your machine. | ||
3. Clone the backend repository from [GitHub](https://github.com/lexicongovernance/pluraltools-backend). | ||
4. Navigate to the backend repository's root directory. | ||
|
||
## Setting up the Backend | ||
|
||
1. install [nodejs v20.14.0](https://nodejs.org/en/download) | ||
- On WSL (Windows Subsystems for Linux) install `node.js v20` as follows: | ||
``` | ||
1. curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - | ||
2. sudo apt install -y nodejs | ||
``` | ||
2. install [pnpm](https://pnpm.io/installation#using-npm) | ||
3. create a `.env` file in the backend repository's root directory. | ||
4. populate the `.env` file with the necessary environment variables. Refer to the `.env.example` file for guidance. | ||
6. `pnpm install` to install the required packages and depencies | ||
5. `make docker-run` will start db and cycle-manager service | ||
7. `pnpm build && pnpm start` will start the server | ||
8. The backend services should now be running and accessible at `http://localhost:8000`. Run `pnpm test` to verify that the backend is running correctly. | ||
|
||
## Setting up the Frontend | ||
|
||
1. Navigate to the frontend repository's root directory. | ||
2. Create a `.env` file in the frontend repository's root directory. | ||
3. Populate the `.env` file with the necessary environment variables. Refer to the `.env.example` file for guidance. | ||
4. Run `pnpm install` to install the required packages and depencies. | ||
5. Run `pnpm berlin:dev` to start the frontend development server: | ||
6. The frontend should now be running and accessible at `http://localhost:3000`. | ||
|
||
You have successfully self-hosted the app! You can now access the frontend and interact with the backend services. |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.