sign-up / register endpoint: create a new Drive and a new Agent in one request

Open
#489 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start by tracing the existing /register, /confirm-email, and invite flows, then compare them with the proposed /signUp endpoint. Define the registration path that generates a key, creates a Drive and Agent, and rejects duplicate usernames. Done means the one-button frontend flow works, the new Drive is created without an invite, and the related tests and changelog are updated.

Written by the indexing model from the issue text.

Description

Creating a new user / Agent is currently always done using Invites. That flow doesn't make a lot of sense for most usecases: users will probably want their own workspace / Drive, and not join some existing one.

So how should that work?

  • I think we need a /signUp endpoint that takes a public key + username and creates a drive + agent.
  • A custom view is warranted, since the client still needs to generate the key (and that should happen at the touch of some button)
  • We should check for name collissions. Every username must be unique, as we'll use that for the URL.

Front end:

  • Use /register and /confirm-email endpoints
  • User can Register using one button
  • Create new drives the new way
  • Remove / change old invite system. Maybe it still should work, but it needs a refactor at least. We at least want users to create a Drive from an agent without an e-mail address.

PR Checklist:

  • Link to related issue closes #640 closes #641
  • Add changelog entry linking to issue
  • Added tests (if needed)
  • (If new feature) added in description / readme
Dominant language
TypeScript
Stars
1.6k
Forks
82
Avg merge
10h 34m
Merged PRs (30d)
205

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ontola/atomic-server

All issues in ontola/atomic-server

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.