Imagine of instead of getting in your car from the suburbs and slogging through traffic to get to work in Boston, you simply walk out your front door, down the street and take a train. Not only would doing that ease congestion on the roads and likely make you calmer, but it would also help revitalize the areas around commuter rail stations in hardscrabble Massachusetts cities like Lynn, just 10 miles north of the city.

Ben Forman, of the think tank MassINC, said right now Lynn is a good example of what planners used to do: build massive parking garages to attract commuters to a city in hopes they would somehow boost the city's economy. As Forman put it, "the question is, if you have people driving into that garage and getting on the train, what benefit does that produce for the city? In my view, not a whole lot ... it just introduces congestion."

But since the garages are up, Forman suggests using them creatively to allow for a lot of housing. "That's because those unused spaces could satisfy parking needed for any new housing development nearby," Forman said. "And with few units available, housing is what is needed in Lynn."

A recent study Forman did of gateway cities, usually former industrial centers, found Lynn to have the greatest potential for housing and job growth within a half mile of its commuter rail station.

Jeff Weeden, planning and development specialist for the Lynn Housing Authority, said that potential is beginning to be realized. "We're seeing a revitalization of the downtown, and I think being this proximity to a commuter rail station, proximity to Boston, its making an attractive alternative to Boston and probably to other areas that people are getting pushed out of."

Weeden said there are several hundred housing units in the pipeline, including a newly announced $80 million project — a ten-story building with 189 rental units above retail and commercial space.

Developer Michael Procopio said it will be built right across from the train station, which is a 20-minute ride away from Boston's North Station.

And Procopio said proximity to mass transit was a key incentive. As he told WGBH news, "we would not have done this project if transit wasn't readily available." And with the maxed-out road system, Procopio said the most attractive thing about living there is being able to walk everywhere.

"You can walk to restaurants, you can walk to the T, you can walk to the beach, you can walk to the marina, you could walk to the ferry to Boston, you can walk to theaters, you can walk to Lynn auditorium. You could live there and not own a car," he said. That appeals to Procopio's target market, young professionals.

And the other big selling point? Procopio said the rents will be half of what they are in Boston's pricier districts.

But what about the people who already live in Lynn, and the potential that they're going to be driven away by the new fancy housing?

MassINC's Ben Forman said making sure affordable housing units are in the mix and improving commuter rail are both essential if Lynn's transformation is to be successful.

Forman said what's happening in Lynn has real implications for all of the gateway cities served by commuter rail.

"Hopefully we will see a wave of 'transit-oriented development' moving outward in concentric circles from Boston," said Forman. "And obviously that will reach Lynn before some of the other cities."

Local officials hope that means the one-time ditty, "Lynn, Lynn the city of sin" could be transformed to "Lynn, Lynn the city that's in."