Next.js-project
Next.js-project
A simple and responsive Next.js application that allows users to log in and view posts and comments
using data from the JSONPlaceholder API. It includes admin access, user-specific posts, Google Maps
integration for displaying user locations, and an admin-only dashboard with a pie chart visualization of
post distribution.
Features
Login Authentication
Admin Access
A special admin account can view all users, all posts, and all comments. Admins can also view the
dashboard with a pie chart showing post distribution.
Regular users can log in with the same email and use it as their password from JSONPlaceholder. They
can view only their own posts and related comments.
View the user's address with an embedded Google Map showing their exact location.
Responsive UI
Styled with Tailwind CSS for a responsive design that works on mobile and desktop.
Demo Login Credentials
Admin Login
Email: [email protected]
Password: admin123
Access: View all users, posts, comments, and the dashboard with a pie chart.
Email: [email protected]
Password: [email protected]
Note: The registration form includes validation only and does not register or save new users.
Pages
cd nexauth-app
@tailwind base;
@tailwind components;
@tailwind utilities;
3. Install ApexCharts
<iframe
src={`https://www.google.com/maps?q=LATITUDE,LONGITUDE&z=15&output=embed`}
width="100%"
height="300"
loading="lazy"
className="rounded-md"
/>
Deployment:
1. Push to GitHub
git init
git add .
Go to Vercel
Credits