Replace MongoDB/Clerk with SQLite/JWT authentication #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migrates database from MongoDB to SQLite and replaces Clerk third-party auth with custom JWT email/password authentication.
Database Changes
data/skytracker.dbon first runserver/utils/database.tsAuthentication Changes
POST /api/auth/register,POST /api/auth/login,GET /api/auth/meST-Auth-TokenheaderuseAuthcomposable manages auth state with localStorage persistenceFrontend Updates
LoginModalandRegisterModalcomponents replace Clerk UIMigration Notes
JWT_SECRETenvironment variable (see.env.example)Example usage:
Dependencies removed: mongoose, @clerk/backend, vue-clerk
Dependencies added: better-sqlite3, drizzle-orm, bcryptjs, jsonwebtoken
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/softmodded/skytracker/eventsnode /home/REDACTED/work/skytracker/skytracker/node_modules/.bin/nuxt build(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Rework the database to use SQLITE instead of Mongo and change clerk out for a custom auth solution that also allows email + Password
[Chronological Review: The conversation began with a user request to rework the database from MongoDB to SQLite and to replace the existing authentication system (Clerk) with a custom solution that supports email and password authentication. The user reiterated this request multiple times, indicating a focus on these two major changes.][Intent Mapping:
[Technical Inventory:
[Code Archaeology: No specific files or code changes have been discussed yet, as the conversation has focused on high-level requests rather than specific implementations.]
[Progress Assessment: No tasks have been completed yet; the user has only made requests for changes.]
[Context Validation: The user’s requests for transitioning to SQLite and implementing a custom authentication solution are clearly captured and ready for further action.]
[Recent Commands Analysis:
1. Conversation Overview: - Primary Objectives: The user explicitly requested to "Rework the database to use SQLITE instead of Mongo and change clerk out for a custom auth solution that also allows email + Password." - Session Context: The conversation has focused on the user's desire to transition from MongoDB to SQLite and replace the Clerk authentication system with a custom solution. - User Intent Evolution: The user has consistently reiterated their request for these changes, indicating a strong focus on simplifying the database and enhancing authentication.- Technical Foundation:
- Database Technology: MongoDB (current) to be replaced with SQLite.
- Authentication Framework: Clerk (current) to be replaced with a custom authentication solution that supports email and password.
- Codebase Status:
- No specific files or code changes have been discussed yet, as the conversation has primarily revolved around high-level requests.
- Problem Resolution:
- Issues Encountered: No specific technical problems have been discussed yet.
- Solutions Implemented: No solutions have been implemented as the conversation is still in the request phase.
- Debugging Context: No ongoing troubleshooting efforts have been mentioned.
- Lessons Learned: No insights or patterns have been discovered yet.
- Progress Tracking:
- Completed Tasks: No tasks have been completed.
- Partially Complete Work: The user’s requests are pending implementation.
- Validated Outcomes: No features or code have been confirmed working.
- Active Work State:
- Current Focus: The user is focused on transitioning the database and authentication system.
- Recent Context: The last few exchanges have been reiterations of the same request for database and authentication changes.
- Working Code: No specific code snippets have been discussed.
- Immediate Context: The user is looking to implement SQLite and a custom authentication solution.
- Recent Operations:
- Last Agent Commands: No specific commands were executed by the agent.
- Tool Results Summary: There have been no tool results to summarize as no commands were executed.
- Pre-Summary State: The agent was awaiting further instructions regarding the user’s requests.
- Operation Context: The user’s requests are aimed at improving the project’s database management and authentication processes.
- Continuation Plan:
- Pending Task 1: Transition the database from MongoDB to SQLite.
- Pending Task 2: Implement a custom authentication solution that supports email and password.
- Priority Information: The transition to SQLite and the custom authentication solution are both high-priority tasks.
- Next Action: Begin planning the implementation of SQLite and the custom authentication system based on the user’s requests.
TITLE: Switching to SQLite and custom authentication solutionCreated from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.