Ask coding questions

← Back to all posts
ReplDB Improvements & Questions
h
RayhanADev (2517)

Hiya!

So right now I'm trying to add ReplDB integration to my ReplAPI.it package through fetching, however I do also want to try and tackle some of the bigger problems with ReplDB as best I can.


For starters, ReplDB does not persist. What I mean by this is if I created Python Repl that stored your username and then sent the spotlight page to you, it stores that data on a ReplDB url that was made for the test/guest fork of that project you are viewing, not the actual ReplDB url for the project I made. This can be "solved" by inputting the ReplDB url but then I expose my url endpoint to everyone so it is easily accessible and thus editable. No good.

So I wondered if there was any way to make the url visible but then lock down the database unless you had the right password or some other verification. (1) Does anyone have any clue how to go about this? or is this one of those cases where we're helpless unless the Replit Team decides to do something about it.


Now ReplDB has simple CRUD features, and then any functions we would normally use like pagination, ordering, etc. would have to be written manually. I want to erase this by adding community requested features that are actually helpful! Like I mentioned previously, pagination and ordering are on my to-do list as well as complete database encryption. (2) Anyone have other ideas? Since my package targets the users it would be very beneficial to tune my work towards your ideas.


Lastly, any other ideas or concepts that might need to be touched are welcome. I certainly do not have enough headspace to think of everything, so I'll source the thinking out to you smart people ;D. Thank's for reading and I hope ya'll have some ideas!

Answered by Coder100 (18146) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (18146)

erm it isn't

you just can't access the env variable at all.

Here's how it gets fixed: interaction through HTTP servers!

RayhanADev (2517)

@Coder100
a. wait what are you answering I had two questions
b. if you're answering (1) wdym? you can get the process.env.REPL_DB_URL?

Coder100 (18146)
  1. you can't xd, replit db is broken until i make a lib that fixes it
  2. i mean i think its meant to be an unopinionated db, so just make sure you abstract things, but still give access to the underlying architecture of the db (if you can't recognize key value, you've done a bad)

@RayhanADev

RayhanADev (2517)

@Coder100 ahhh okay I think I gotcha. Thanks! :D