Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 31 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# ENVIRONMENT="development" # or "debug", "debugwait", "production"
# Valid choices: "development", "debug", "debugwait"; anything else will cause it to run in production mode
ENVIRONMENT="development"

DATABASE_USER=postgres
DATABASE_PASSWORD=secret
Expand All @@ -11,8 +12,13 @@ RUN_COMPILE_MESSAGES=True
RUN_COLLECT_STATIC=True
RUN_CREATE_SUPER_USER=True

ENABLE_DJANGO_ADMIN=True
DJANGO_ADMIN_EMAIL=admin@example.com
DJANGO_ADMIN_PASSWORD=secret
DJANGO_ADMIN_PASSWORD=admin

# Regular admin account
SEED_ADMIN_EMAIL=admin1@example.com
SEED_ADMIN_PASSWORD=admin1

NO_REPLY_EMAIL=
DEFAULT_FROM_EMAIL=
Expand All @@ -26,13 +32,30 @@ EMAIL_HOST_PASSWORD=
EMAIL_USE_TLS=False
EMAIL_USE_SSL=False

AWS_COGNITO_REGION=eu-west-1
AWS_COGNITO_CLIENT_ID=
AWS_COGNITO_CLIENT_SECRET=
AWS_COGNITO_DOMAIN=ngohub-staging.auth.eu-west-1.amazoncognito.com
AWS_COGNITO_USER_POOL_ID=eu-west-abcdef_0123456789
# AWS_COGNITO_REGION=eu-west-1
# AWS_COGNITO_CLIENT_ID=
# AWS_COGNITO_CLIENT_SECRET=
# AWS_COGNITO_DOMAIN=test-staging.auth.eu-west-1.amazoncognito.com
# AWS_COGNITO_USER_POOL_ID=eu-west-abcdef_0123456789

# VOTONG_WEBSITE=https://votong.staging.heroesof.tech
# PAUL_WEBSITE=https://paul.staging.heroesof.tech
# NGOHUB_API_HOST=api-staging.ngohub.ro
# NGOHUB_API_ACCOUNT=
# NGOHUB_API_KEY=

DEBUG=True
DJANGO_VITE_DEV_MODE=True

ALLOWED_HOSTS=localhost
SECRET_KEY="replace-this-example-key"
SENTRY_DSN=""

# Background tasks
BACKGROUND_WORKERS_COUNT=1

# Recaptcha is disabled if no public key is provided
RECAPTCHA_PUBLIC_KEY=
RECAPTCHA_PRIVATE_KEY=

CORS_ALLOWED_ORIGINS=http://localhost:3000
CORS_ALLOW_ALL_ORIGINS=True
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
node_modules
dist

# ignore the static files destination directory
backend/static

# local env files
.env.*
!.env*.example
Expand Down
13 changes: 4 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,20 +151,16 @@ bash: ## start a bash shell


## [Requirements management]
requirements-build: ## run pip compile and add requirements from the *.in files
requirements-build: ## run uv to build the requirements files using the active venv
docker exec paul_backend_dev sh -c " \
cd ./backend && \
pip-compile --strip-extras --resolver=backtracking -o requirements.txt requirements.in && \
pip-compile --strip-extras --resolver=backtracking -o requirements-dev.txt requirements-dev.in \
uv sync --active \
"

requirements-update: ## run pip compile and rebuild the requirements files
requirements-update: ## run uv with the -U flag to update the requirements files using the active venv
docker exec paul_backend_dev sh -c " \
cd ./backend && \
pip-compile --strip-extras --resolver=backtracking -r -U -o requirements.txt requirements.in && \
pip-compile --strip-extras --resolver=backtracking -r -U -o requirements-dev.txt requirements-dev.in && \
chmod a+r requirements.txt && \
chmod a+r requirements-dev.txt \
uv sync --active -U \
"


Expand Down Expand Up @@ -196,4 +192,3 @@ clean-db: ## remove the database files
rm -rf ./backend/media ./backend/static ./frontend/dist

clean: clean-docker clean-extras clean-db ## remove all build, test, coverage and Python artifacts

144 changes: 144 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
# Paul — The Database Manager

[![GitHub contributors][ico-contributors]][link-contributors]
[![GitHub last commit][ico-last-commit]][link-last-commit]
[![License: MPL 2.0][ico-license]][link-license]

An easier way to manage your NGO's databases

[Find out more about the project][link-ngohub]


[Contributing](#contributing) | [Built with](#built-with) | [Feedback](#feedback) | [License](#license) | [About Code for Romania](#about-code-for-romania)

## Contributing

This project is built by amazing volunteers, and you can be one of them. Here's a list of ways
in [which you can contribute to this project][link-contributing]. If you want to make any change to this repository,
please **make a fork first**.

Help us out by testing this project in the [staging environment][link-staging]. If you see something that doesn't quite
work the way you expect it to, open an Issue. Make sure to describe what you _expect to happen_ and _what is actually
happening_ in detail.

If you would like to suggest new functionality, open an Issue and mark it as a __[Feature request]__. Please be specific
about why you think this functionality will be of use. If you can, please include some visual description of what you
would like the UI to look like if you’re suggesting new UI elements.

## Built With

### Frontend

- [JavaScript](https://www.javascript.com/)
- [React.js](https://react.dev/)
- [Vite](https://vitejs.dev/)
- [Tailwind CSS](https://tailwindcss.com/)
- Package manager: [npm](https://www.npmjs.com/)

### Backend

- [Python3.13](https://www.python.org/)
- [Django](https://www.djangoproject.com/)
- Package manager: [uv](https://docs.astral.sh/uv/)

### Database technology & provider

- [PostgreSQL](https://www.postgresql.org/)

### Platforms

- [AWS](https://aws.amazon.com/) through [Terraform](https://registry.terraform.io/providers/hashicorp/aws/latest/docs)
- [Docker](https://www.docker.com/) for local development and deployment

## Development

### Deployment without Docker

#### Prerequisites

- Python 3.13 with [UV](https://docs.astral.sh/uv/)
- Install UV with: `curl -LsSf https://astral.sh/uv/install.sh | sh`
- [NVM](https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating) to install and manage Node.js versions
- a PostgreSQL 16.4 database (can be run with Docker)

1. Go to the root of the project
2. Run `cp .env.example .env.local` to create the environment file
3. Configure your database to run with the configuration in the `.env.local` file
or run the database using docker with `docker compose up -d db_psql_dev` or `make rund-db`
4. Set up the Node.js environment
1. Go to the `frontend` directory
2. Run `nvm use || nvm install` to install the Node.js version specified in the `.nvmrc` file
3. Run `npm i` to install the Node.js dependencies
5. Set up the Python environment
1. Go to the `backend` directory
2. Install the Python dependencies by running `uv sync`

#### Running the project

1. Run the Django project in one terminal
1. Go to the `backend` directory
2. Run `source .venv/bin/activate` to activate the Python virtual environment
3. Run `django-admin runserver localhost:8000` to start the Django development server
2. Run the frontend in another terminal
1. Go to the `frontend` directory
2. Run `nvm use` to use the Node.js version specified in the `.nvmrc` file
3. Run `npm run dev` to start the frontend development server
3. Open http://localhost:8000 in your browser

:information_source:
**Configure whatever port works best for you.**
For Django, change the `:8000` to whatever works best for you.
For the frontend, set the `DJANGO_VITE_DEV_SERVER_PORT` variable in the `.env.local` file

:bangbang:
**In case of problems with the instructions**, please open an issue.
If you managed to find a solution, please open a PR with the changes.


### Deployment With Docker

1. Go to the root of the project
2. Run `cp .env.example .env` to create the environment file
3. Run `make run` to start the containers with an PostgreSQL database
4. Open http://localhost:8080 in your browser

## Feedback

* Request a new feature on GitHub.
* Vote for popular feature requests.
* File a bug in GitHub Issues.
* Email us with other feedback [contact@code4.ro](mailto:contact@code4.ro)

## License

This project is licensed under the MPL 2.0 License — see the [LICENSE](LICENSE) file for details

## About Code for Romania

Started in 2016, Code for Romania is a civic tech NGO, official member of the Code for All network. We have a community
of around 2.000 volunteers (developers, ux/ui, communications, data scientists, graphic designers, devops, it security
and more) who work pro bono for developing digital solutions to solve social problems. #techforsocialgood. If you want
to learn more details about our projects [visit our site][link-code4] or if you want to talk to one of our staff
members, please e-mail us at contact@code4.ro.

Last, but not least, we rely on donations to ensure the infrastructure, logistics and management of our community that
is widely spread across 11 timezones, coding for social change to make Romania and the world a better place. If you want
to support us, [you can do it here][link-donate].


[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job.)

[ico-contributors]: https://img.shields.io/github/contributors/code4romania/paul.svg?style=for-the-badge
[ico-last-commit]: https://img.shields.io/github/last-commit/code4romania/paul.svg?style=for-the-badge
[ico-license]: https://img.shields.io/badge/license-MPL%202.0-brightgreen.svg?style=for-the-badge

[link-contributors]: https://github.com/code4romania/paul/graphs/contributors
[link-last-commit]: https://github.com/code4romania/paul/commits/main
[link-license]: https://opensource.org/licenses/MPL-2.0
[link-contributing]: https://github.com/code4romania/.github/blob/main/CONTRIBUTING.md

[link-ngohub]: https://www.ngohub.ro/ro/paul
[link-staging]: https://paul.staging.heroesof.tech/

[link-code4]: https://www.code4.ro/en/
[link-donate]: https://code4.ro/en/donate/
45 changes: 0 additions & 45 deletions backend/accounts/migrations/0001_initial.py

This file was deleted.

This file was deleted.

30 changes: 0 additions & 30 deletions backend/accounts/models.py

This file was deleted.

1 change: 1 addition & 0 deletions backend/hello/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
app_name = "hello"
urlpatterns = [
path("", views.home, name="homepage"),
path("test-menu/", views.test_menu, name="test-menu"),
path("health/", views.health, name="health"),
]
Loading