Iran’s millennials are launching successful start-ups amid the gift and curse of sanctions. (Courtesy of Digikala, Cafe Bazaar and Mani Lotfizadeh)

About 15 years ago, he was the first kid in his Tehran high school to get the Internet. “Don’t try to tell anybody else about it,” he recalls his principal warning. “It might affect their culture, their beliefs.”

She was an early Internet user, too, and obsessed with Yahoo messenger. She’d message strangers in chat rooms while assuring her concerned parents that she wasn’t revealing too much.

Fast forward to today and the duo is at the helm of some of Tehran’s thriving start-ups. Both left Europe for careers in Iran. Cafe Bazaar co-founder Hessam Armandehi, 28, and Takhfifan founder Nazanin Daneshvar, 30, have turned profits, had to move to larger offices and gained thousands of customers. His high school now has WiFi. And she’s too busy for chat rooms, but has come to idolize Yahoo chief executive Marissa Mayer.

Shades of Silicon Valley are bubbling up in Tehran, which is home to a growing tech ecosystem with start-ups, accelerators and a venture capital firm, despite the significant challenges of launching a tech company in Iran.

“It’s definitely more difficult than any other country,” said Eyad Alkassar, who manages the Middle East investments for Rocket Internet, a German company that replicates successful businesses in the developing world.

Insiders say there has been a turning point in the past two years.

“When I came to Iran, no one even knew the word start-up,” said Daneshvar, who returned to her native country three years ago after working in Germany.

“If you look at the use of the words like entrepreneurship, start-ups and venture capital, I think you will see a trend that there was absolutely a minimum, nothing mentioned in Iran for two years,” said Said Rahmani, who founded Tehran’s first venture capital firm, Sarava. “Now you can talk about venture capital, VCs, its become a fashion.”

Rahmani was born in Iran but left as a teenager for the United States. He worked for IBM and launched a start-up in Upstate New York. Later as an employee of Internet company Naspers, he was asked to evaluate the possibility of investing in Iran start-ups. Ultimately, Naspers decided not to invest, but Rahmani was convinced of the country’s potential and returned to where he was born.

He and others point to the combination of a young, educated population, the proliferation of smartphones and increasing Internet speeds as fertile landscape for start-ups. The country’s leading start-up — Digikala — is similar to The World Start-Up Fund says that it is worth $150 million.

There are other signs, too. Iran Web Festival, launched in 2008 to recognize the country’s best Web sites, started with just 100 applicants. This year, 8,000 Web sites entered, and 450 people attended a related conference. Start-Up Grind has opened a chapter in Tehran to connect and mentor entrepreneurs.

Iran now has three accelerators, including Avatech, which accepted its first class in October. They offer mentors such as Reza Hashemi, 38, who started the popular Persian Blog in 2001 as the Iranian equivalent of Blogger. At that time, Hashemi wasn’t able to raise money for his site as he encountered investors who were unfamiliar with the Internet.

On the front lines of Iran’s growth are Armandehi and Daneshvar, who know well the challenges, advantages and frustrations of launching an Internet company in Iran, where sanctions are both a gift and a curse.

Daneshvar’s profitable business — Takhfifan —  is essentially a Groupon clone. Her site has more than 1 million e-mail subscribers and offers 25 deals per day. One especially successful deal sold 20,000 tickets to a movie. She also launched a Web site that resembles Yelp, and has 20,000 user-written reviews.

Although international sanctions on Iran are imposed to hinder the economy, they’re somewhat of a benefit to entrepreneurs who don’t have to compete with international companies that are barred from operating in the country. But the road to a successful start-up is bumpy, and entrepreneurs can’t dream of scaling their business globally. Growing locally isn’t always easy either.

“Where’s your manager?” Daneshvar remembers being asked in a meeting with a prospective client.

“I am the manager,” she said.

“Look, go back and come back with your manager. The idea is good but just come back with your manager.”

Disappointed and saddened, she went home and told her father. “Welcome to Iran,” he said.

She rescheduled the meeting and came back with her father. This time a deal was struck.  For a year, Daneshvar would bring her father to meetings. He’d first introduce himself as the manager, then sit back quietly as his daughter took over and explained the business.

Armandehi has tangled with his own issues, and became frustrated with how Silicon Valley companies have handled Iranian sanctions. After college, Armandehi attended a graduate program in Sweden, but chose to return home.

“If I came back to Iran, I would lose everything that I could do outside Iran — reservation via Airbnb, working on Android Market. I was losing everything and still I was not that unhappy with it. I felt that we can create everything inside Iran ourselves,” Armandehi said.

Because Google’s app store for Android wasn’t initially available in Iran, it opened a door in 2010 for Armandehi to co-found Cafe Bazaar, which is essentially an Android app store for Iranians. It had 100,000 users within three months, and now has 10,000 local apps available from more than 2,000 developers. According to World Startup Report, it’s worth $20 million.

To manage the growth, in March 2012 Armandehi became a customer of Zendesk, a Danish start-up, which could provide a helpdesk for Cafe Bazaar. He figured he’d be safe from sanctions, given Zendesk’s European roots. But suddenly in November of that year Zendesk cut him off. All the e-mail threads and support tickets for customers were lost. He asked Zendesk for a chance to back up the files. He never heard back.

So Cafe Bazaar resorted to using gmail to respond to customers. He missed Zendesk’s ability to track the performance of his customer service team, and couldn’t find alternative software until this fall.

“If you’re looking for a technology, if you’re looking for a device, if you want to buy a server, if you really need investment from other countries, yes in these parts sanctions are very bad,” said Shayan Shalileh, who started Iran Web Festival.

Armandehi previously had an account on Google’s Android Market, where he launched a Persian calendar app. The account was later suspended by Google (but because of an apparent bug in the system he still receives monthly e-mails alerting him that “you’ll need to take action to receive your payment this month”).

At a 2012 conference in Barcelona, Armandehi asked then-Google chief executive Eric Schmidt if he would do anything to loosen the restrictions on Iranians.

Schmidt offered condolences and cited the role of sanctions, but also drew laughter from the crowd when he said, “Prison is like, no bandwidth.”

“He didn’t answer me with respect,” Armandehi told me. “It’s made me more determined to provide what Google does not provide for Iranians.”

The desire to build inside its borders and deliver all the online services Iranians need was a common thread among Iranian entrepreneurs I spoke with.

One of them was Sina Zand Karimi, who builds apps for Cafe Bazaar. The 20-year-old has made $20,000 since launching a popular car racing app two months ago. He’d like to launch a game studio in Iran, but his parents want him to complete his degree at Sharif University of Technology first. The school produces a lot of tech talent, including the founders of the dating service Zoosk.

Although many top students — such as the Zoosk co-founders — leave Iran to pursue more degrees or launch careers, there are reasons to believe they can be successful at home.

Twin brothers Hamid and Saeed Mohammadi, 35, founded the now-vaunted Digikala after a frustrating attempt to buy a digital SLR camera. They spent more than two months researching a camera as they struggled to find review Web sites in Farsi. When they finally settled on a Nikon D70, there were no e-commerce companies operating in Iran. So they bought a camera from a brick-and-mortar retailer in Tehran.

But their photos turned out blurry. When they asked a friend in photography for advice, he pointed out that the camera’s lense had been swapped out for a worse model.

“The seller cheated us,” Hamid Mohammadi recalled.

So the brothers used $20,000 in savings to start their business. They borrowed office space from their brother, who didn’t charge them rent for their first year.

Today Digikala receives 3,000 orders a day. Mohammadi thinks the $150 million valuation for his company should be even higher as he expects $100 million to $150 million in revenue this year. Digikala has 450 employees, and expects to have 700 in five months. It will have distribution centers in 16 cities in two months, and will offer next-day delivery in those cities. All deliveries are made by Digikala employees.

The company was profitable from the start, by necessity, but this year Digikala is focused on growth. Profits can take a backseat this year as Digikala ramps up around Iran. That’s possible only because of venture capital, which until recently was unheard of in Iran. Although the brothers plan to focus on Iran for now, they are considering growing to Afghanistan, Turkmenistan and Iraq.

“What is happening now which makes this as something very idealistic and dreamy, now that they have the local success stories they can refer to them,” said Mohsen Malayeri, who launched the accelerator AvaTech. “They will refer to the founder of Digikala and say, ‘He’s able to make it here. So why not me?’ ”