A general template for web applications