DEV Community

Yasser Mbarek
Yasser Mbarek

Posted on

How I built a Moroccan Legal AI with $0 to beat a $200k Startup

The Backstory I had this idea a while ago an AI that explains Moroccan Law to normal people. I started coding it in my bedroom, taking my time, trying to make it good.
Then, the worst thing happened.
While I was still working on mine, another startup launched the exact same concept. They were faster than me. A few months later, they were on national TV, raising $200k (approx. 2 million MAD) from investors.
I Almost Quit I thought it was over. They had the money, the fame, and the "First Mover" advantage. I’m just a 19-year-old student with a $100 budget.
But then I actually used their app.

  • It felt heavy and slow.
  • The UI was cluttered.
  • The AI actual answers where harder to read than the original law scripture.
    I checked their Google PageSpeed score. It was 28.
    I realized that "First" doesn't mean "Best." They might have the funding, but that made them slow and corporate. I had nothing to lose, so I could focus purely on the code.
    I decided to finish my project anyway, but with one rule that it has to be faster than theirs. cause theirs take 2-5 min to answer but mine ~10 sec.

  • Frontend: Next.js

  • Data: I wrote a Python script to scrape the official government law texts myself (Official Bulletin & SGG).

  • Performance: I stripped away all the bloat. No tracking scripts, no long logins.

I finally launched 9anon AI.

I'm sharing this because I almost stopped working on my dream project because I saw someone else "win." But money can't buy a clean codebase.
If you are a student and you see a big company doing what you want to do don't stop. You can probably build it faster than them.

Check it out here: https://9anonai.com
(And yes, the data scraper is open source, check it out in https://github.com/berserker-glitch/moroccan-law-data)

Top comments (1)

Collapse
 
peacebinflow profile image
PEACEBINFLOW

This story is way more relatable than most people admit. Seeing someone else ship your idea with funding and TV exposure is enough to kill motivation fast — so the fact that you kept going already says a lot.

What stood out to me is that you didn’t try to out-market them, you out-executed them. Speed, readability, and restraint matter way more in something like legal AI than flashy demos. If the output is harder to read than the law itself, the product failed, full stop.

Also, that PageSpeed score detail says everything. Money buys teams, not taste or discipline. When you’re solo (or small), you can optimize for the things that actually matter instead of meetings, dashboards, and “enterprise features” nobody asked for.

Scraping the official sources yourself and keeping the pipeline lean is a power move too. That’s real ownership of the problem, not just wrapping an API and calling it innovation.

Honestly, this is a good reminder that first mover advantage is overrated. Being fast, clear, and focused beats being early and bloated more often than people think. Respect for finishing it — especially at 19. Keep shipping.