r/reviewmycode • • Jul 17 '26

Javascript [Javascript] - I am looking for feature suggestions

2 Upvotes

Meet reef.js, a fuzzy, keyboard-first search for static sites. No backend, no build step, no account — drop in one script and it works on this page. But the real game changer is the DOM extraction layer Reef doesn't just search for things, it can act on them. A revolutionary yet simple tool for AI agents to act on websites, and more.

I am looking for ways to improve and build upon this project, so please let me know if you have any suggestions, ideas, etc.

Try it out at - https://reef.js.org
Github - https://github.com/somalip/Reef

Thanks!

r/reviewmycode • • Feb 19 '26

JavaScript [JavaScript] - A No-Dependencies Web-Only Markdown Editor

1 Upvotes

I made a markdown editor with its own tokenizer and parser. It has nearly all the markdown features, supports live preview, supports file editing from browser itself, and supports sharing of content just by sharing the website link. Please check it out and review my code. Here is the GitHub repo link - https://github.com/herotyphoon/Marky

r/reviewmycode • • Dec 08 '25

JavaScript [JavaScript] - This is just a code.org project for school.

1 Upvotes

I've been working on this for a while, so i wanted to know if it looked alright. I know it doesn't need to look perfect but i would still like outside opinions. https://studio.code.org/projects/applab/Ls2UdUYpjaTala3H3wJlsOOLfHRiMrkpEcnNBENzkbg

r/reviewmycode • • Mar 09 '23

JavaScript [JavaScript] - would anyone review my game? I am a beginner.

2 Upvotes

Hi,

while learning JS from an Udemy course I started developing this game as a practice. I would be very happy if someone could take a look at the game/code and tell me what they think : )

https://github.com/faforus/monopoly

http://fifipoly.surge.sh/ - working hosted version

Here are few notes.

  1. I know that the game has too few fields to make much sense but this is only about logic and implementation. It is not hard nor relevant to increase the number of fields at this moment.
  2. Creating new player with alert is not the best choice but at this point it is not that relevant either. It is very easy to fix.
  3. I learned about MVC architecture at one of the last lectures of the course when the game was almost complete. I tried to rewrite the game but it is more complicated than I expected and I am not sure if it is worth the effort. In the future I would probably plan this in advance.
  4. You move the player by either clicking on the dice or pressing r button. Holding r button down will speed up a game as it will continuously be rolling dice and taking turns unless buy property popup appears

r/reviewmycode • • May 25 '20

JavaScript [JavaScript] - Generating a random, short and readable code

5 Upvotes

Hi! I am creating a little online multiplayer game for fun. Players should be able to join each others session by entering a short code. As I do not have a lot of experience with cryptographic stuff, I would be happy if someone could look over my code that generates these.

Here it is:

import * as crypto from 'crypto';

/**
 * Generates a random code used for players to join a session.
 * It should be short and easy to enter an a variety of devices.
 * The code has to be somewhat cryptographically secure so that
 * guessing it is reasonably hard, as it is fairly short.
 * 
 * Currently the code is a base32 string using the following
 * characters: 123456789abcdefghkmnopqrstuvwxyz
 * 
 * Which are all alphanumeric characters without 0ijl.
 * 
 */
export function generateRandomCode() {
    // We need 4 times 5 = 20 bits, so less than 3 bytes
    let random = crypto.randomBytes(3).readUIntBE(0, 3);
    let code = '';

    // Take 5 bits for 4 times (for every char of the code)
    for (let i = 0; i < 4; i++) {
        code += byteToChar(random);
        random = random >> 5;
    }

    return code.toUpperCase();
}

/**
 * Maps five bits to a char in 123456789abcdefghkmnopqrstuvwxyz.
 * All other bits of the input number are ignored.
 * @param num The number to map from.
 */
function byteToChar(num: number): string {
    // ignore unused bits
    const bits = num & 0b11111;

    // 1 to h
    if (bits < 17)
        return (bits + 1).toString(36)

    // k
    if (bits < 18)
        return 'k';

    // All the rest
    return (bits + 4).toString(36);
}

I am mostly concerned about two questions:

  • Are 20 bits enough so that guessing a code is highly unlikely? There should be about one million possible codes, which sounds fine to me, but I'm not an expert.
  • Will the generated codes be evenly distributed? I have read that biases in the distribution of generated outputs is a common mistake when doing such things.

It's not that I expect the game to be actually used a lot, but I want to ensure at least some quality if I put it online.

Thank you very much!

r/reviewmycode • • Dec 07 '20

JavaScript [JavaScript] - Please review my code | Celcius/Fahrenheit Converter

3 Upvotes

I am learning JavaScript. Just made this Celcius/Fahrenheit Converter. Please review my code and give your opinion.

https://codeshare.io/arzVxY

r/reviewmycode • • Jun 21 '17

Javascript [Javascript] - Online Store

2 Upvotes

Recently, I was given an interview assignment to create an online shopping store. I decided to build the store in React/Redux. The specifications were easy as they are basic functionalities. I didn't hear back so I was wondering what was wrong with my code.

Since it was a small project, I structured my code in Rails project directory.

https://github.com/lunzhang/store