Sounds like Pretty Cure (2004-2005).
Futari wa Pretty Cure (ふたりはプリキュア, Futari wa PuriKyua, lit. "We Are Pretty Cure"), known as simply Pretty Cure outside Japan, is a Japanese magical girl anime series produced by Toei Animation and broadcast across Japan on TV Asahi's ANN network. It is the first series in the Pretty Cure metaseries created by Izumi Todo. The original series, directed by Daisuke Nishio, aired on TV Asahi between February 1, 2004, and January 30, 2005, in the same timeslot as Izumi Todo's previous work Ashita no Nadja. It was the first of the Pretty Cure series to have received an adapted English-language version, which aired in United States From February 2005 And Also Canada from March 2009.
Futari wa Pretty Cure revolves around two girls, Nagisa Misumi and Honoka Yukishiro, who encounter the Garden of Light's Mipple and Mepple, who give them the power to transform into the emissaries of light; Cure Black and Cure White, to fight against the forces of the Dark Zone: a dimension of evil that has encroached on the Garden of Light and is now about to do the same to the Garden of Rainbows, Earth. The Cures search for the Prism Stones, placing them in a heart-shaped device known as the Prism Hopish, protected by the Guardian, Wisdom. Once they have discovered all the Prism Stones, its power takes them to the Garden of Light and repairs most of the damage done by the Dark Zone. Later in the series, Porun, the Prince of the Garden of Light, grants the Pretty Cure duo use of their Rainbow Bracelets as they defeat the Dark King.
The two main characters certainly match your description, and they do each have a clamshell device, containing small Tamagotchi-esque creatures.