DebateArena V2 is HERE❗️❗️
🆙What's new?
Profile section where users can check out their highlight debate performances.
New leaderboard system where rankings are based on debaters average of overall scores.
Check it out: https://t.co/2jbMwPBTXB
#webdev
drop your feedback🔽
How do different coding languages talk to each other?
They use a Serialization Standard like JSON to create a common ground.
🔄 Serialize: Client converts data to a universal format.
🔄 Deserialize: Server converts it back.
JSON rules the web!
#WebDev#APIs
🔹 $cond: Evaluates if/then/else logic (paired with $in) 🔹 $Project: Reshapes output (exclude _id by setting it to 0)
I will post more tomorrow. today i just studied aggregation pipeline to see how i will apply to my project.
#BuildInPublic#Backend#JavaScript#NodeJS#MongoDB
Learned about #MongoDB Aggregation Pipelines today
Documents pass through stages to transform data:
🔹 $MATCH: Filters documents like a query
🔹 $lookup: Performs a left outer join with another collection (from, localField, foreignField, as)
🔹 $addFields: Appends new fields
I'm back finally after so many days.
And have also started working on my new biggest backend project.
I built complete auth with JWT today ( check GitHub repo).
I will post more about the project daily here.
#buildinpublic#nodejs#express#webdev
Stop using app.use(cors()) blindly. The default setup allows ANY domain to access your API.
To fix this, pass a configuration object specifying your exact frontend domain in the origin field.
It works on localhost and production while keeping your data safe!
#buildinpublic
Another day of learning backend!
Built a user registration model using Mongoose for MongoDB.
Defined strict data schemas and constraints:
• Uniqueness (no duplicate emails/usernames)
• Automatic lowercase sanitization and timestamps by mongoose
#backend#webdev#JavaScript
learning backend..
Axios offers advantages over Fetch by automatically parsing JSON responses and stringifying request data, eliminating extra code.
Furthermore, Axios natively handles HTTP errors, allowing developers to catch 4xx/5xx status codes within a standard catch block.
Today i learned about filter() from scratch. pretty simple actually.
2 functions.
one the callback function which returns true if the condition is true.
second is the filter which stays the same, loop through the array and check if callback true then push it in filtered array. Ez
✅ Just added a user profile page in debate arena website.
⭐The profile shows highlight performance with user's highest scoring debate and lowest scoring one
🔁Fetched profile info and debate results i.e username, date of account created & best and worst results from supabase.
If you are using reduce(), do not forget to figure out what data type you want. the initial value also defines the data type of the output.
If you want to perform an operation and store it in an array then you will have to set it's initial value as an empty array.
🧠
I was planning to add guest mode to Debate Arena but it's way more complex than I thought because my whole website is db eccentric. it would required a whole re planning of database and workflow. I chose to have a demo account and also add a sign in as google feature. coming soon
Just shipped DebateArena.
Check it out here : https://t.co/2jbMwPBTXB
A platform where you can debate against different AI
opponents:
Professional
Debater
Aggressive Challenger
Twitter Troll
and more...
Faced A LOT of bugs but finally it is done.
Would love some feedbacks.
Just shipped DebateArena.
Check it out here : https://t.co/2jbMwPBTXB
A platform where you can debate against different AI opponents:
Professional
Debater
Aggressive
Challenger
Twitter Trol
and more...
Faced A LOT of bugs but finally it is done.
Would love some feedbacks.
Just shipped DebateArena.
Check it out here : https://t.co/2jbMwPBTXB
A platform where you can debate against different AI opponents:
Professional Debater
Aggressive Challenger
Twitter Troll
and more...
Faced A LOT of bugs but finally it is done.
Would love some feedbacks.