Data Room: Share Links & Artifact Publishing
Hey guys, let's dive into the Alchemy Data Room and explore how we can revolutionize how you share and publish artifacts. This isn't just about sticking a document somewhere; it's about crafting a seamless experience for your team and collaborators. We're talking about shareable links, controlled access, and a user-friendly interface that makes data sharing a breeze. We're also providing additional functions such as share link creation, artifact publishing, data room, secure tokens, email invite, revoke share link, publish button, and expiration settings. Get ready to supercharge your workflow!
The Grand Vision: Streamlining Data Sharing
Sharing data shouldn't feel like navigating a maze. Our goal is to make it simple, secure, and intuitive. Imagine being able to publish an artifact with a single click, generate a shareable link in seconds, and control access with granular settings. That's the power we're building into the Data Room. This feature allows users to set expiration dates, enable source uploads, and invite viewers via email. We're also including functionality to manage the links, with options to view a list of all active links and revoke access when necessary. This level of control and ease of use is what sets the Data Room apart. Think of it as your digital command center for all things data.
The "Publish" Button: Your Artifact's Gateway
Let's start with the heart of it all: the "Publish" button. With a simple click, you can mark an artifact as published and make it accessible within your Data Room. This isn't just a status update; it's a signal to your team that the artifact is ready for viewing and collaboration. And because we're all about clarity, a "Published" badge will prominently display on artifact cards, making it immediately clear which items are live and available. This small but impactful feature eliminates confusion and ensures everyone is on the same page. The Publish button is the initial step.
Share Link Creation: Control at Your Fingertips
Next up, we have the share link creation feature. This is where you get to decide who sees what and for how long. The modal offers several ways to define how your data is shared, including expiration settings and upload permissions. When you click the share button, a modal pops up with all the options needed to share the artifact. These options allow you to tailor the access based on your needs. The goal is to provide secure tokens to create the URL that's needed to share your artifacts to your team.
Expiration Dates: Time-Limited Access
We understand that sometimes, you need to share information for a limited time. That's why we're offering a variety of expiration options. You can choose from:
- None: The link never expires.
- 1 day: The link is active for 24 hours.
- 7 days: The link is active for a week.
- 30 days: The link is active for a month.
- Custom date: Set an exact date.
This level of flexibility ensures that your sensitive information remains secure. You can also allow the viewers to upload data if the user has permission to do so.
Allow Viewer Source Uploads: Collaboration Made Easy
Want to encourage collaboration? The "Allow Viewer Source Uploads" toggle allows you to give viewers the ability to upload files, providing an easy way for them to share their work. This is excellent for any collaborative project. Toggle this option on or off as needed. It's a simple way to facilitate the flow of information. This option is very important to improve the quality of your workflow.
Secure Tokens: Protecting Your Data
Security is paramount, which is why we're generating secure random tokens for every share URL. These tokens are designed to be virtually impossible to guess, safeguarding your data from unauthorized access. The share URL format will be something like /share/{token}
. This ensures that only those with the link can view the artifact.
Copy to Clipboard and Email Invites: Sharing Made Simple
Once you've created a share link, we want to make it as easy as possible to share. You will have a copy link button that will copy the full URL to your clipboard. From there, you can paste it wherever you need it. We're also integrating an email invite option via Resend. With a few clicks, you can send the link directly to collaborators' inboxes. The copy feature makes sharing easy.
Share Links List: Keeping Track of Everything
To ensure you always know what's active, we're providing a share link list page. This will display all active share links for your company. You'll see the artifact, the token, the expiration date, who created the link, and a revoke button. It's your central hub for managing data access.
Revoke Share Link: Taking Control Back
Sometimes, you need to take back control. The revoke share link functionality allows you to delete a share link record, instantly disabling access. This feature is crucial for maintaining data security and control. If a link expires or you do not want it to be valid anymore, you can revoke access.
Implementation Deep Dive
Let's get into the nitty-gritty of how we're making all this happen. This section will give you a glimpse of the technical architecture and the components that bring these features to life.
API Routes: The Backbone of Functionality
We're building robust API routes to handle all the actions related to data sharing. These routes are the core of our system, managing interactions with the database and ensuring everything runs smoothly. Each route serves a specific purpose, from publishing artifacts to creating share links and revoking access. The routes are:
- PUT /api/v1/artifacts/[id]/publish: Marks the artifact as published. This updates the database to reflect the new status.
- POST /api/v1/artifacts/[id]/share: Creates a share link with specified settings. This generates the secure token and sets the expiration date.
- GET /api/v1/share-links: Lists all share links for a company. This retrieves all active share links from the database.
- DELETE /api/v1/share-links/[id]: Revokes a share link. This deletes the link record from the database.
- POST /api/v1/artifacts/[id]/share/invite: Sends an email invite. This uses Resend to send a share link via email.
Components: Building the User Experience
We're creating several key components to provide a seamless user experience. These components work together to ensure that the user can do everything they need in a clean and intuitive interface. This includes:
- PublishButton: This component handles the publishing of artifacts. It's a simple button that toggles the published status.
- ShareModal: This is where you set the link settings. It manages the expiration date, the upload permissions, and generates the share link.
- ShareLinksList: This lists all active share links, allowing you to manage and revoke access.
Database Structure
The underlying database ensures all these functions run smoothly, from the published status to the shareable links. This functionality ensures that every action is saved and accessible to the relevant parties.
Testing and Validation
We're committed to delivering a reliable and secure system. We'll be conducting thorough testing and validation to ensure everything works as expected. We'll verify that the publish button functions correctly, the share modal works, expiration dates are calculated correctly, links are copied to the clipboard, and email invites are sent successfully. The share links list displays all active links and the revoke function does what it's supposed to do. These tests will give us confidence in our solution. We can make the Data Room a powerful tool.
Design Decisions and Security
Here are some of the design decisions we've made to ensure security and ease of use:
- Secure Tokens: We're using 64-character random hex tokens for security.
- No Password Protection: We're relying on token secrecy for initial security.
- Soft Delete: Revoke deletes the record.
Dependencies, Blocks, and Future Enhancements
We will build on this foundation. This feature is dependent on Epic #2 (Database) and Epic #12 (Artifact Generation). This also blocks Epic #15 (Viewer Experience), which will build on this. We'll also consider more complex security features.
By following this plan, we're building a powerful, secure, and user-friendly data-sharing solution. This makes sharing and collaborating on artifacts seamless and efficient.
Let's keep the momentum going, guys! This is going to be great!"