Skip to content
Sign upLog in
← Back to Community

LF: A Collaborator on the Repl.it User Search Bar

Profile icon
RayhanADevHacker

Well, I take no shame in admitting that I’m lazy in the matter of databases xD. I need a bit of help making this search bar an actual “search-bar” (as

@DynamicSquid
and
@pepelaugh
have pointed out). So...

Anyone Interested in Helping Make a Repl.it User Search-Bar?

You need to be good at Javascript, know a bit about HTML, and have to be great at databases. Contact me in the comments below!

Voters
Profile icon
badst
Profile icon
RayhanADev
Comments
hotnewtop
Profile icon
EarthRulerr

It’s not even a search bar…. It just goes to

@searchinput

Profile icon
RayhanADev

@EarthRulerr
this is superrrr old wow xD nostalgia. I made three revisions of a Replit User searchbar, one using the Replit API: https://replit.com/talk/share/Presenting-Replit-User-Search-v3/145961. Replit now uses their own API like I did on the search bar on the site B).

Profile icon
EarthRulerr

That one is good! Amazing job

@RayhanADev

Profile icon
Coder100

don't we already have that?

image

User search bars don't require databases, but in this case, we may need to.
We do encounter an error however, what would be the newest user?

Profile icon
RayhanADev

@Coder100
wdym?

Profile icon
[deleted]

Cant you just do this?
https://repl.it/@CarlosRosiles/Some-project
It doesn't require any databases or anything

Profile icon
RayhanADev

@CarlosRosiles
, my guy. That’s what already exists. Literally the same except with CSS and one line less of code.

Profile icon
[deleted]
Profile icon
RayhanADev

We WANT a database so that we can add more complex features!

Profile icon
[deleted]

@RayhanADev
Oh ok. I suck at databases! lol

Profile icon
RayhanADev

@CarlosRosiles
xD same man I feel you!

Profile icon
Coder100

why do you need a database

@RayhanADev

Profile icon
realTronsi

I don't think you can access repl's database of users

Profile icon
RayhanADev

@realTronsi
and you see, that’s what I realized. What I am currently thinking is having user who wants to opt into a “Search Bar” program add their name to a database.
Hey, do you want to help?

Profile icon
realTronsi

@RayhanADev
you'll need a backend for that

Profile icon
RayhanADev

@realTronsi
and this is why I want a collaborator. I don’t do heavy back-end work, I like front-end UX stuff. I understand JS enough to be able to use it. Any suggestions on how I would even start this in back-end?

Profile icon
realTronsi

@RayhanADev
if you understand JS you could start with NodeJS, since the entire backend is just js, so it'll be convenient. You could look into replit-db docs and express and it should be enough to get the job done

Profile icon
realTronsi

@realTronsi
I mean I could help but it depends on if I have time

Profile icon
RayhanADev

@realTronsi
alright, well I transport the files into a NodeJS project and then add you as collaborator. If you have time then feel free to drop in!

Profile icon
techpixel

@realTronsi
@RayhanADev
that is completely wrong
Repl.it has a graphql. Learn more about it here

Profile icon
RayhanADev

@HarperframeInc
ok explain more I was lost as soon as I read three words into Coder100’s answer (backend dev is more confusing than frontend) xD.

Profile icon
realTronsi

@HarperframeInc
I don't see how that can help

Profile icon
techpixel

@RayhanADev

You gotta research about it. It's not that hard...

To see Repl.it's GraphQL editor, click here
Learn more about GraphQL.

It's just a simple post request. I don't know all the features exactly, you may have to ask someone from repl.it to help you with that.

Well think about it. You can get replit's list of users by making a query through GraphQL.

Profile icon
realTronsi

@HarperframeInc
he is trying to create a search function, post requests to determine if the provided username is valid doesn't help in this case

Profile icon
techpixel

@realTronsi
Yes it does. If it doesn't exist, then you'll get a 404 json back from the website.

Profile icon
RayhanADev

@HarperframeInc
,
@realTronsi
is right, I really don’t need to know if the username is valid, however you did give me a really nice idea... :)

Profile icon
realTronsi

@HarperframeInc
no what he is trying to achieve is an autocomplete feature

Profile icon
techpixel

@realTronsi
Well if you query with a prefix, lets say, "real", it will return a list of keys with the prefix "real", so "realTronsi", "reallyCoolGuy", "real10381", and so on. That sounds like autocomplete to me.

Also before you ask anymore questions, please read the GraphQL documentation

Profile icon
CSharpIsGud

@HarperframeInc
I've tried using graphql and I can say that without knowing what is defined etc its a real mess.

Profile icon
techpixel

@CSharpIsGud
I do agree with that. It's really confusing, so that's why they made the talk API.

Profile icon
CSharpIsGud

@HarperframeInc
For a project like a user search bar it might be easier to just crawl repl talk and find them that way along with manual entering.

Profile icon
techpixel

@CSharpIsGud
It's much more diffcult like that though. I'm not sure.

Profile icon
CSharpIsGud

@HarperframeInc
It's not that difficult compared to graphql it's just that it might not have people that don't post or comment often. Unless people search for them explicitly.

Profile icon
RayhanADev

@CSharpIsGud
True, at the current moment me and realTronsi are using Node as a backend and making it so users have to manually enter themselves into a database for additional features (such as the autocomplete).

Profile icon
CSharpIsGud

@RayhanADev
You should definitely crawl repl talk then. That should cover anyone people would know about to want to search. You could even expand it to far more than just a user search.

Profile icon
RayhanADev

@CSharpIsGud
it sounds like you know what to do. Wanna join?

Profile icon
CSharpIsGud

@RayhanADev
hmm okay

Profile icon
RayhanADev

@CSharpIsGud
done! You’re part of it!

Profile icon
Coder100

dw, i have the schema

@CSharpIsGud