Frontend for the ParmaAI data mining and analytics platform.
.
ParmaAI is a sophisticated platform combining advanced data mining with comprehensive analytics. At its core, Parma Analytics orchestrates the data lifecycle, scheduling and managing data mining modules, and processing the extracted data using tools like ChatGPT for in-depth analysis and report generation. Complementing this, Parma Web provides a user-friendly interface for data management and visualization, making the system's complex functionalities accessible and intuitive. Together, they form a powerful solution for businesses to monitor, analyze, and respond to corporate anomalies, leveraging data-driven insights for strategic decision-making.
Parma Web is the interactive user interface of the ParmaAI platform, designed for efficient data source management and visualization. It not only serves as a gateway for users to add, edit, and delete data sources but also ensures that these sources are seamlessly integrated into the platform once they are independently deployed. The repository is crucial for enhancing the user experience, providing clear visualization of analytics results, and facilitating interaction with the backend analytics system. Ideal for contributors focusing on front-end development, Parma Web combines usability and functionality, making complex data insights accessible and understandable for all users.
Related repositories:
Landing Page | Login Page | News Feed |
---|---|---|
Profile Page | Settings Page |
---|---|
Sidebar Navigation | Pure keyboard Interface |
---|---|
Company Dashboard |
---|
Create Company | Company Attachments |
---|---|
Bucket Dashboard |
---|
Create Bucket | Delete Bucket | Share Bucket |
---|---|---|
Data Source Dashboard |
---|
Create Data Source | Configure Data Source |
---|---|
You can find the latest deployment of this project on parma.software. The staging deployment is available on staging.parma.software.
The following steps will get you started with the project.
Pre-requisites: to be able to contribute to JST in this repository, make sure to comply with the following prerequisites.
v18
via node version manager (nvm
) to not cause conflicts with other projects of yours.Clone the repository
(Windows Users) : Make sure to clone the repository on remote WSL!!
git clone git@github.com:la-famiglia-jst2324/parma-web.git
Precommit & pnpm setup:
make install
Skip to 4. if everything worked
In case you encounter errors while installing pre-commit, do one of the following :
Install pre-commit with sudo:
sudo apt install pre-commit
pre-commit # check that it has been correctly installed
Install pre-commit using conda
"${SHELL}" <(curl -L micro.mamba.pm/install.sh)
bash
micromamba activate
micromamba install pre-commit
pre-commit # check that it has been correctly installed
Mac Users: consider using brew install pre-commit
Rerun the command to make sure there are no errors :
make install
Setup Firebase Admin SDK & GCP Credentials:
The Firebase Admin SDK is used to verify user tokens in the backend (Next API routes).
Please download this secrets json file from Notion and place it in /src/api/.secrets/la-famiglia-parma-ai-firebase-adminsdk.json
.
Also make sure to have /src/api/.secrets/la-famiglia-parma-ai-secret-manager.json
file with this certificate to be able to access the secret manager.
Start the development server
make dev
Open http://localhost:3000 with your browser to see the result.
Optional: Running parts of the pre-commit pipeline manually
make lint # runs linting
make build # builds the project
Test your code and code coverage:
As the tests require a postgres database to be running, you need a postgres database running locally. For that you can use the docker-compose file in the root directory of this project.
docker compose up -d
then before actually running the tests you must set the environment variable with the database credentials.
Consider using .env
files for that.
export NEXT_PUBLIC_ENV="staging"
export POSTGRES_URL="postgresql://parma-prod-db:parma-prod-db@localhost:9000/parma-prod-db"
make test # runs jest and typescript-coverage-report
Environment Variables Other Than Database URL
export PARMA_ANALYTICS_BASE_URL=http://127.0.0.1:8000
Optional: Run a production build (used in the CI pipeline)
make start
Open http://localhost:3000 with your browser to see the result.
Follow the steps below to update your local database with recent changes
Make sure your .env file contains:
POSTGRES_URL="postgresql://parma-prod-db:parma-prod-db@localhost:9000/parma-prod-db"
To apply the recent changes to your local database, run:
pnpm prisma migrate dev
If you want to populate your database, run the following commands, under the root directory, in order:
tsc src/api/db/populate.ts
node src/api/db/populate.js
Create a new branch linear.app offers a button to copy branch names from tickets. In case there is no ticket, please use feel free to use an arbitrary name or create a ticket. GitHub CI doesn't care about the branch name, only the PR title matters.
# format: e.g. robinholzingr/meta-1-create-archtecture-drafts-diagrams-list-of-key-priorities
git checkout -b <branch-name>
Open a PR and use a conventional commit PR title.
Wait for CI pipeline to pass and if you are happy with your changes request a review.
Merge the PR (using the "Squash and merge" option) and delete the branch. Pay attention to include co-authors if anyone else contributed to the PR.
If you want to release a new version to production, create a new release on GitHub. The release version will be automatically derived from the PR titles (breaking changes yield new major versions, new features yield new minor versions).
The following directory structure is used in this project:
.
├── node_modules: temporary directory for node dependencies
├── public
│ ├── next.svg
│ └── vercel.svg
├── src: Source code directory for both backend and frontend
│ ├── api: Backend API
│ ├── app: Frontend app
│ ├── components: Reusable components
│ ├── contexts: Frontend context providers
│ ├── lib: generic / non ui functions
│ └── types: Typescript types
├── tests: Tests directory
├── Makefile: Recipes for easy simplified setup and local development
├── README.md
├── next-env.d.ts
├── next.config.js
├── package.json
├── pnpm-lock.yaml
├── postcss.config.js
├── tailwind.config.ts
└── tsconfig.json
Core libraries that this project uses:
This project is deployed on Vercel in @robinholzi's peronsal account. As the hobby (free) plan enough for now, we will stick to it for the time being.
Every commit to a PR branch will trigger a deployment preview. Every new version released on GitHub will trigger a production deployment.
In the future we might add a staging deployment that is deployed to on commit to the main
branch.
Reach out to @robinholzi if you can benefit from this.
Maybe it would make sense to create a dedicated la-famiglia mail box to which at least the meta team has access to.
We might switch to something else after choosing a full-stack framework like Firebase
, Supabase
or AWS Amplify
.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
In case there are any issues with the initial setup or important architectural decisions/integrations missing, please contact the meta team or @robinholzi directly.