-
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.
- Loading branch information
1 parent
53f8b8f
commit 64f65ab
Showing
5 changed files
with
125 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[Makefile] | ||
indent_style = tab |
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,10 +1,11 @@ | ||
prepare-dev: | ||
install: | ||
@echo "Preparing development environment..." | ||
$(MAKE) -C ./apps/govquests-api prepare-dev | ||
@echo "Database is running on Docker." | ||
@echo "Installing dependencies..." | ||
pnpm install | ||
$(MAKE) -C ./apps/govquests-api install | ||
@echo "Dependencies installed..." | ||
@echo "Setting up database..." | ||
$(MAKE) -C ./apps/govquests-api/rails_app setup | ||
@echo "Database is running on Docker." | ||
@echo "Development environment ready." | ||
|
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,101 @@ | ||
# README | ||
# GovQuests | ||
|
||
- Rails API runs in port 3001, and next app runs in port 3000 | ||
GovQuests is a platform designed to gamify governance participation and education in the Optimism ecosystem. It combines a Ruby on Rails API backend with a Next.js frontend to create an engaging experience for users to learn about and participate in governance activities. | ||
|
||
## Project Structure | ||
|
||
The repository is organized as a monorepo with the following structure: | ||
|
||
- `apps/` | ||
- `govquests-api/`: Ruby on Rails API backend | ||
- `govquests/`: Core domain logic organized by bounded contexts | ||
- `infra/`: Domain infrastructure-related code | ||
- `rails_app/`: Rails application | ||
- `govquests-frontend/`: Next.js frontend application | ||
|
||
## Prerequisites | ||
|
||
- Node.js (version specified in `.tool-versions`) | ||
- pnpm | ||
- Ruby (version specified in `.tool-versions`) | ||
- Docker (to spin up a PostgreSQL instance), or PostgreSQL itself (if using this don't forget to update credentials in database.yml or set DATABASE_URL) | ||
|
||
## Setup | ||
|
||
1. Clone the repository: | ||
|
||
``` | ||
git clone https://github.com/your-org/govquests.git | ||
cd govquests | ||
``` | ||
|
||
2. Install dependencies and prepare the development environment: | ||
|
||
``` | ||
make prepare-dev | ||
``` | ||
|
||
This command will: | ||
|
||
- Set up the database in Docker | ||
- Install Node.js dependencies using pnpm | ||
- Install Ruby dependencies for the API and its subprojects | ||
|
||
## Development | ||
|
||
To start the development servers: | ||
|
||
1. For the API (from the `apps/govquests-api/rails_app` directory): | ||
|
||
``` | ||
bin/rails server | ||
``` | ||
|
||
2. For the frontend (from the `apps/govquests-frontend` directory): | ||
|
||
``` | ||
pnpm dev | ||
``` | ||
|
||
## Testing | ||
|
||
Run tests for all projects: | ||
|
||
``` | ||
pnpm test | ||
``` | ||
|
||
To run tests for specific parts of the application: | ||
|
||
- API: `make -C apps/govquests-api test` | ||
- Frontend: `pnpm --filter govquests-frontend test` | ||
|
||
## Linting and Type Checking | ||
|
||
- Lint the entire project: | ||
|
||
``` | ||
pnpm lint | ||
``` | ||
|
||
- Run type checking: | ||
|
||
``` | ||
pnpm check-types | ||
``` | ||
|
||
## Building for Production | ||
|
||
Build all projects: | ||
|
||
``` | ||
pnpm build | ||
``` | ||
|
||
## Contributing | ||
|
||
Please read our [Contributing Guide](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests. | ||
|
||
## 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
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