PNID.app is a powerful tool for labeling and managing Process and Instrumentation Diagrams (P&IDs), designed to streamline the reading and analysis process for engineers and technicians in the process industry.
- Project Management: Create and organize projects using images or PDF files of P&IDs.
- Intuitive Labeling: Easily label P&IDs with different categories of components.
- Metadata Management: Add and edit metadata for labeled components.
- Public Sharing: Generate public views for each labeled P&ID.
- AI-Assisted Predictions: Utilize machine learning for automated metadata suggestions.
- Export Functionality: Export labeled P&IDs to PDF format.
This application is available in two formats:
- Online Version: Access the app directly at beta.pnid.app. This version is hosted and maintained by our team and is meant for users who want to try it out immediately.
- Self-Hosted Version: For users who require more control over their data or need to integrate the app into their own infrastructure, we offer a self-hosted option. Follow the self-hosting guide in the next section to set up your own instance of the application.
Choose the option that best suits your needs and security requirements.
This project utilizes Supabase and Next.js, along with a Flask server for PDF export and an Express server for AI-assisted metadata parsing. For local development, we use the Supabase CLI to initialize a Supabase instance and Docker Compose to orchestrate the Next.js, PDF export, and metadata parser servers.
- Supabase CLI
- Docker and Docker Compose
- Node.js and npm
- OpenAI API key (for metadata parsing)
- Start the Supabase instance:
supabase start
- Note the
API URL
,anon key
, andservice_role key
provided upon completion. - Populate the database schema, storage buckets, and RLS policies:
./supabase/seed.sh
- Determine the external IP address of your host machine:
- On Linux/macOS:
ifconfig
orip a
- On Windows:
ipconfig
- On Linux/macOS:
- Rename
.env.example
to.env.local
. - Update
.env.local
with the following:- Set
NEXT_PUBLIC_EXTERNAL_API
to your external IP address. - Set
NEXT_PUBLIC_SUPABASE_ANON_KEY
to theanon key
from Step 1. - Set
SUPABASE_SERVICE_KEY
to theservice_role key
from Step 1. - Optionally, customize other variables as needed.
- Set
Update the docker-compose.yml
file with the following:
- Set
SUPABASE_URL
tohttp://{NEXT_PUBLIC_EXTERNAL_IP}:54321
. - Set
SUPABASE_SERVICE_KEY
to theservice_role key
from Step 1. - Set
OPENAI_API_KEY
to your OpenAI API key.
- Build and start the Docker containers:
docker compose up --build
- Access the application at
http://{YOUR_PUBLIC_EXTERNAL_IP}:3000
.
We have exciting plans for the future of PNID App. Here's a glimpse of what's coming:
- Editor: customize component type
- Editor: improved pipe labeling
- Editor: example-based metadata parsing
- Viewer: comments and markups from collaboration
- Export: integration with popular CAD software and workflow
- Project: multi-page documents
- Search functionality
We're always open to suggestions! If you have ideas for new features or improvements, please open an issue with the title "Feature Proposal", or send an email to support@pnid.app!
We welcome contributions to the PNID App! Please fork our repository, clone and make your updates, and submit a pull request! Please make sure to use meaningful commit messages and a meaningful title for your pull request.
This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3) - see the LICENSE file for details. This license ensures that if you modify the software and provide it as a service over a network, you must make the modified source code available to users of that service.