They buy it all legally — prepacked buds, rolled joints and even cannabis oil. They can also pick up marijuana-laced candy, cookies, Jello shots and more than a dozen other products.

Welcome to Rhode Island's Thomas C. Slater Compassion Center, a medical marijuana dispensary that could be a model for as many as three dozen facilities that could open in Massachusetts in the next year. Licenses have already been granted for 20 facilities, including locations in Brockton, Quincy and Taunton.

Karen van Unen, executive director of the DPH Medical Marijuana program, expects there to be up to 26 dispensaries open in this state by August.

The licenses come after voters, as they did in Rhode Island, overwhelmingly backed a state law allowing marijuana to be used by people with debilitating medical conditions such as cancer, multiple sclerosis and Parkinson's disease.

The Slater Center opened in April 2013 inside a former mail-processing facility adjacent to Interstate 95 in downtown Providence. The warehouse-style building is equipped with a security system that tracks everyone's movement, has bulletproof walls and glass, strict environmental controls and a filtering device that prevents the telltale odor of marijuana from leaving the building.

Free of signs and nondescript on the outside, the center resembles a high-end boutique inside. Customers are mostly 55 and older and, their numbers have been increasing monthly since the center opened. Each is allowed to purchase up to 2.5 ounces of medical marijuana every two weeks.

The center's sales area features modern glass display cases with an array of marijuana products, including dried buds, extracts and edible items. In addition to organic marijuana products, the center also arranges on-site classes and services for patients to manage pain and reduce stress through nutrition, massage, yoga, acupressure, art and music therapy, meditation and an herb clinic.

The product sells for roughly $300 an ounce, or more — the same as it does on the street. Insurance does not cover the items, but the center has payment plans and discounts for those who need assistance. All patients must provide proof of their medical conditions through doctors and register with the state.

Officials in Rhode Island have decided to let the street price for illegal marijuana set the price for the drug at the Slater Center to discourage patients from trying to resell the marijuana.

The Slater Center is operated by a locally controlled nonprofit corporation. Its 13,500-square-foot building is split equally between an indoor marijuana-growing area and the sales area, which customers visit.

The growing center is watched carefully because of the value of its contents — the marijuana plants.

It takes four to five months for a "grow" to reach harvest stage, and the Slater Center harvested its first crop, which it calls "Hollywood Haze," in September. Like medical marijuana outlets elsewhere, the names of the center's marijuana products have origins often in the late-1960s.

The grow starts with seedlings, called clones, which are grafted from mother plants. The goal is to guarantee all plants are cellular copies of the parent stock.

"We're trying to replicate the ideal environment for a plant. We have a better environment than nature. No drought and optimum lights," said Joel Allcock, director of cultivation.

In the nursery, for example, fans blow to mimic the wind, which causes stems to grow stronger — stronger stems mean bigger buds.

Each seedling is assigned a bar code and remains in the nursery until it sprouts roots. The growing plant then is moved to another room where it is artificially shaped. The outer branches are staked to grow outwards, allowing light to reach the center branches, which forces the plant to produce 64 buds, the maximum number possible.

During the final phase of growth, the marijuana plants are doused with a 1,000 watts of high-intensity light for 18 hours a day. After that, the buds are dried and tested for potency, labeled, packaged and stamped with the original bar code.

Business has been surging at the center. Sales are expected to more than double by the end of the second year, to around $3.9 million.

"If we can provide a medicine that can help people and give relief, who can refuse?" McGraw said.