Hannah Webster Foster wrote and published The Coquette under the pseudonym of "A Lady of Massachusetts" in 1797. The book, an epistolary novel (told through letters), became one of the most popular novels of the 18th century.
Foster based her novel on the true story of Elizabeth Whitman. The Salem Mercury published Whitman's story on July 29th, 1788, reputedly written by the landlord of Bell Tavern, Captain Goodhue. She was from a respectable family but created a scandal when she delivered an illegitimate child and died soon after at the tavern. The story was disseminated widely; it was particularly popular amongst clergymen, who used Whitman's story to preach against immorality and deviations from traditional gender norms and roles. Foster was trying, however, to draw attention to the double standard in which women who engaged in "inappropriate" sexual behavior were demonized, while men who did the same were rarely held accountable for their actions. She added details to render the situation more complex rather than simply work with stereotypes.
The book was a massive bestseller, going through thirteen editions by the end of the 19th century. Foster was revealed as its author in 1866, about two decades after her death.
Foster's novel is particularly popular amongst feminist historians and literary critics, who see Wharton as representative of all 18th-century women and their sufferings under patriarchy. Some see the novel as an allegory in which Wharton represents the new nation, as women and virtue held a strong link in politics at the time of the novel's publication. Wharton's quest for independence mirrors that of the new nation, but, of course, this message is complicated by the fact that Wharton does not achieve true freedom.