* UN-2774 [FEAT] Add sharing functionality for ETL pipelines - Added shared_users and shared_to_org fields to Pipeline model - Implemented IsOwnerOrSharedUser permission using common permission class - Added API endpoints for managing pipeline sharing - Updated frontend to support sharing modal and user selection - Fixed issue with empty user list in sharing modal 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [REFACTOR] Move Django Q import to top of file Move the Django Q import from inside the method to the top-level imports for better code organization and consistency. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [FEAT] Add granular permissions for pipeline operations - Restrict destroy, update operations to owners only - Allow shared users access to other operations - Add typing import for type annotations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [FEAT] Enhance sharing notification system - Add conditional import for notification plugin with fallback - Map pipeline types to proper resource types (ETL/TASK) - Improve error handling and logging for notification failures - Prevent update operation failure when notifications fail 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Addressing review comments --------- Co-authored-by: Claude <noreply@anthropic.com>
This project was bootstrapped with Create React App.
Steps to setup the frontend in local
Requirements
NodeJS 16
-
Clone this repo in your machine
git clone https://github.com/Zipstack/unstract.git -
Navigate to the path
unstract/frontendand run the following commandsnpm install
Steps to run the setup
npm start
- Node will automatically run the
localhost:3000in your browser. The page will reload when you make changes. You may also see any lint errors in the console.
Notes
- Install the Prettier extension in your VSCode editor https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode
- Install the ESLint extension in your VSCode editor https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
Available Scripts
In the project directory, you can run:
npm start
Runs the app in the development mode.
Open http://localhost:3000 to view it in your browser.
The page will reload when you make changes.
You may also see any lint errors in the console.
npm test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
npm run build
Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Linting and Formatting
The project includes ESLint and Prettier for code quality and formatting.
Available commands:
npm run lint- Check for linting errorsnpm run lint:fix- Auto-fix linting errorsnpm run prettier- Check formatting issuesnpm run prettier:fix- Auto-fix formatting issuesnpm run lint:all- Run both ESLint and Prettier fixes on all filesnpm run lint:changed- Run ESLint and Prettier only on changed files
Note: Make sure to run npm install first to install the required dependencies.
React Strict Mode
React Strict Mode is enabled by default, which will mount all components twice during local development.
This helps in verifying the integrity of the React components, and is in alignment with all the frontend use cases known and envisioned currently.
Learn More
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
Code Splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
Analyzing the Bundle Size
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
Making a Progressive Web App
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
Advanced Configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
Deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
npm run build fails to minify
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
Dockerization
Dockerizing a project bootstrapped with Create React App (CRA) is a common practice to ensure consistent development and deployment environments. Docker containers provide isolation and portability, making it easier to manage your application's dependencies and run it consistently across different environments.
Development
Create a Dockerfile.dev for development. This Dockerfile will use Node.js to set up your development environment:
Remember, you need to have your app code and any necessary files in the same directory as this Dockerfile. To build and run the Docker container, you can use the following commands:
# Build the Docker image
docker build -t frontend:dev -f Dockerfile.dev .
# Run the Docker container
docker run -it -p 3000:3000 frontend:dev
Production
Create a Dockerfile.prod for production. This Dockerfile will use NGINX to serve your optimized production build:
npm ci && npm run build
docker build -t frontend:prod -f Dockerfile.prod .
docker run -p 80:80 frontend:prod
If you need a custom NGINX configuration, place it in your project root folder (e.g., nginx.conf) and copy it using the COPY command in Dockerfile.prod.
This approach allows you to have separate Dockerfiles for development and production while keeping them in the root folder of your React app. It helps you maintain a consistent and organized structure for managing different deployment environments.