The homes next to the Barclays Center are stacked up and ready for you.

Pacific Park’s developers officially opened its first residential tower, 461 Dean, for leasing Tuesday. The 31-story building, which has been in the works since 2012, is the largest property in the country to be constructed modularly.

Crews built 930 rooms in a factory, shipped them to the site at the corner of Dean Street and Flatbush Avenue, and stacked and connected them like Lego blocks to create the 363 rental apartments.

“It was a long process because no one had taken time to build a modular building this big,” said Adam Greene, of Forest City Ratner, the developer behind the tower and the other Pacific Park properties.

The building, which was hit with delays due to lawsuits and financial issues, has 149 studios, 166 one-bedroom and 48 two-bedroom units, half of which will be set aside for affordable rates. Over 84,000 prospective residents applied for the affordable units, which will be doled out via the city’s affordable housing lottery, according to Forest City Ratner.

The market rate apartments will start at $2,450 for studios, $3,125 for one-bedrooms and $4,750 for two-bedrooms. The affordable units start at $559 for a studio, $600 for a one-bedroom and $727 for a two-bedroom.

In addition to views of the Manhattan skyline, Downtown Brooklyn and the Statue of Liberty, the building has a host of amenities including a game room, lounge and rooftop terrace. Chris Sharples, of SHoP Architects, which designed both 461 Dean and the Barclays Center, said residents wouldn’t be disturbed by arena events.

“We engineered it that way, both the building and the arena,” he said.

Greene said the first tenants are expected to move into the tower at the end of the month and progress on the other buildings in the Pacific Park plan is moving along at a steady pace.

Three buildings, a condo at 550 Vanderbilt and two rentals that will offer 100% affordable units at 535 Carlton Ave. and 38 Sixth Ave., will open in the next nine months. The new residences will have a combined 879 new apartments. Two other buildings will open at a future date.