Hugging the Long Island Expressway in Queens is a stretch of identical brick buildings so vast that it looks like a city within a city.

In fact, it is. Welcome to LeFrak City, a 20-tower housing complex built in the 1960s for middle-class New Yorkers that is still home to some 15,000 of them.

Now, as the original developer’s son and grandsons wrap up a $70 million upgrade project that has taken several years, the community has entered the modern era.

The son of the original builder, Richard LeFrak, is flanked by sons Jamie (left) and Harrison, who still manage the community.Lois Weiss

Sprawled across 40 connected acres with not a scrap of litter or cigarette butt in sight, it’s made up of 16-story apartment buildings with about 4,600 rental apartments — which are reasonably priced for the pockets of Elmhurst and Corona it straddles.

The complex is, in fact, so big that it has its own newspaper: the LeFrak City Courier. A recent issue contained stories celebrating more funding for its own public library branch, instructions for finding election polling sites, tips for saving water and a notice encouraging residents to sign up for LeFrak City’s new online maintenance portal.

Developed and built by the late Samuel J. LeFrak between 1962 to 1971 — notably, without any public funding — it is still privately owned and managed by his son Richard, along with grandsons Jamie and Harrison LeFrak.

LeFrak City is one of several large apartment projects developed after World War II to house both returning veterans and the city’s growing number of families graduating from walk-up tenements and low-rise apartment houses to high-rises with new appliances and finishes.

These mega-complexes included Starrett City — now rebranded as Spring Creek Towers — and Trump Village in Brooklyn, as well as Co-op City in the Bronx. Manhattan’s Penn South and Stuyvesant Town/Peter Cooper Village were also built in this wave. Unlike LeFrak, all of these have grounds that are still open to the public or are dissected by city streets.

Some, like LeFrak and Stuy Town, were developed with private money as rentals, while later projects such as Co-op City and Penn South included government subsidies and ownership plans that were structured to empower residents while still keeping housing affordable.

Bordered by 57th Avenue, Junction Boulevard, 99th Street and the Horace Harding Expressway (a service road-like thoroughfare that runs parallel to the LIE), LeFrak fell into disrepair in the ’70s. That rough patch has long passed; today, a working-class tenancy hailing from dozens of countries has made it a lovely microcosm of New York.

“They come from around the world,” says Jamie LeFrak, during a recent tour, of current residents. “It’s rock-solid employed middle class.”

Over the last five years, the LeFraks’ most recent investment has brought in a further melting pot of young professionals and families who enjoy the extensive amenities and large apartments along with its convenient location near shopping (the Rego Center mall and other big-box stores) and transportation (Queens Boulevard is accessible by car, plus there’s the Woodhaven Boulevard stop on the M and R trains).

LeFrak has two new turf fields, making it very soccer-friendly.LeFrak

The master plan for the most recent upgrades, by Rosen Johnson Architects, included installing solar panels on the rooftops and making infrastructure upgrades to the façade, roofs and boilers. There are now new parking decks and energy efficient lighting. The complex has also been ramped for wheelchair access. There are also new bushes and plantings designed by Mathews Nielsen Landscape Architects that provide plenty of green space.

Especially exciting for LeFrak City’s athletes are two green synthetic fields for both active and passive uses. “They are very soft and can be misted on hot days,” says general manager David Bernhardt, who previously managed Manhattan’s similarly giant Stuyvesant Town and Peter Cooper Village. One large turf circle was laid down as the centerpiece of a giant courtyard with surrounding benches. Another rectangle is enclosed for soccer. On a recent day, moms with toddlers appreciated the fence as they lounged and chatted in the sun.

Nearby, there are new playgrounds and swings for different ages, along with a low basketball court for preteens and a regular-sized one for teens and adults.

The LeFraks spent $70 million on upgrades that include new playgrounds, turf fields, a swimming pool and landscaped outdoor space.LeFrak

The new outdoor pool is no deeper than 4 feet, so it’s kid-friendly. Though it’s closed for the season — after making a splash for the few weeks it was open this summer — it will reopen next spring.

Permanent ping-pong tables — their metal “nets” emblazoned with “LeFrak City” logos — plus other city park staples such as chess boards, a foosball table, a tennis court and a putting green, are also on the premises.

Although there are no shuffleboard courts, there is a new privately run “day care”-like facility for seniors that has been added to the three actual day care locations. The latter makes the project a convenient place for working parents.

Each four-building sub-section of the massive community bears the names of foreign countries or cities. For instance, Mexico, Canada, Panama and the United States make up one cluster; Rome, Paris, Copenhagen and London comprise another.

“The names of the buildings were a nod to the [1964] World’s Fair, which was on during that time,” says LeFrak.

All building lobbies have been upgraded, and pretty tiles now encircle their round structural columns. Formerly dark, closed-off building entrances have new lighting, plus long glass walls that overlook the fountains, with plantings, at the center of each four-building group.

All these upgrades have made LeFrak City more desirable than ever. Its thousands of apartments are currently 98 percent full. Because of normal turnover, there are always around a dozen units available.

LeFrak’s security team includes a crowd-pleasing new robot.Lois Weiss

Currently, they range in rent from $1,900 for a one-bedroom apartment to $2,800 for a three-bedroom pad with a terrace. Several residences, in fact, have terraces; the newest units have been renovated with stainless-steel appliances, stone countertops and wood floors.

The sprawling private grounds and their newly snazzy amenities are no longer open to the public. Security cameras are posted everywhere; cheery safety officers greet everyone who passes. The vibe is less “Big Brother” and more “Mister Rogers’ Neighborhood.”

One new addition to LeFrak’s security team is a first for New York City as a whole: a 4-foot-tall white robot who scoots around, acting as a roving security camera, and even says “hello.”

So far, the ’bot remains unnamed — although some staffers call it “Rosie” after the maid on the “The Jetsons.” It is also being programmed to engage in helpful interactions, such as directions to each of the buildings or amenities.

“The children follow it around and get in its way,” says LeFrak, “so it will go around them and chirp.”