Our mission is to create a campus ecosystem characterized by free-flowing information, collaborative spirit, and easy access to academic resources. Our platform goes beyond being a mere tool; it serves as a gateway to unlock your potential. Through seamless integration with Canvas, we offer immediate access to course syllabi, support real-time discussions, and provide a comprehensive database of peer-generated course ratings and reviews. Join us on this educational journey, embrace the possibilities, and become a member of a dynamic community committed to achieving academic success. With UniGrow, your academic goals are achievable.
- Next Js for the application
- Upstash for messaging
- Pusher for notification
- MongoDB as the primary storage
- Next Auth with Google Provider
- CRON scheduler
Set the following environment variables in the .env
file at the root folder of the repository. Ensure all values are enclosed in quotes.
These come from Pusher:
- NEXT_PUBLIC_PUSHER_APP_ID
- NEXT_PUBLIC_PUSHER_APP_SECRET
- NEXT_PUBLIC_PUSHER_APP_KEY
- NEXT_PUBLIC_PUSHER_APP_TLS="true"
- Setup an account with Pusher.
- Create a new channels project with the closest region to you.
- Obtain app keys and set them as specified.
- Note the cluster string from the project and set it for the cluster attribute in
./lib/pusher.ts
.
- GOOGLE_CLIENT_ID
- GOOGLE_CLIENT_SECRET
- Create an account at Google Cloud Console.
- Navigate to credentials, create credentials, and choose service management API.
- Select user data, add required scopes, and set authorized origins and redirect URIs.
- Obtain and set the client ID and client secret.
- NEXT_PUBLIC_UPSTASH_REDIS_REST_URL
- NEXT_PUBLIC_UPSTASH_REDIS_REST_TOKEN
- Create an account on Upstash.
- Create a new database, set details, and obtain credentials from the REST API section.
- Set the obtained values for Upstash environment variables.
- NEXT_PUBLIC_CANVAS_BASE_URL
- NEXTAUTH_URL
- NEXT_API_SEED_SECRET
- NEXT_PUBLIC_HASHING_KEY
- NEXTAUTH_SECRET
- CRON_SECRET
- MONGO_DB_NAME
- MONGODB_URI
- Adjust the values based on your setup.
- Generate an MD5 hash for specified secrets.
These come from Firebase:
- NEXT_PUBLIC_FIREBASE_API_KEY
- NEXT_PUBLIC_FIREBASE_APP_ID
- NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN
- NEXT_PUBLIC_FIREBASE_DATABASE_URL
- NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID
- NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID
- NEXT_PUBLIC_FIREBASE_PROJECT_ID
- NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET
Follow the steps to set up Firebase and configure your Next.js project.
- Navigate to Firebase Console.
- Add a new project and create a web app.
- Copy the configuration to your
.env
file. - Set the Firebase environment variables.
- Set the storage rules in the Firebase console.
- Run
npm install
. - Run the application in different modes:
- Development mode:
npm run dev
- Production mode:
npm run prod:deploy
- Production mode from scratch:
npm run prod:install:deploy
- Create production image:
npm run build
- Run production image:
npm run start
- Development mode:
Open http://localhost:3000 in your browser to see the result.
To reseed the MongoDB database with fresh data, you can use the /api/mongo
route. Follow the steps below to perform the reseeding process:
-
Route:
/api/mongo/
- This endpoint is specifically designed for reseeding the MongoDB database.
-
Authorization:
-
Ensure that you include a valid bearer token in the Authorization header when making requests to this endpoint. Use the Next API seed secret specified for seeding.
Example:
Authorization: Bearer $NEXT_API_SEED_SECRET
-
-
How to Reseed Data:
-
Make a
POST
request to this endpoint to trigger the reseeding process.Example:
GET /api/mongo/
-
-
Response:
-
The endpoint will respond with a message indicating the success of the reseeding process.
Example:
{ "message": "MongoDB data reseeded successfully" }
-
-
Note:
- Ensure that you have the necessary permissions and a valid Next API seed secret in your environment variables.
Remember to replace placeholders like $NEXT_API_SEED_SECRET
with the actual environment variable or secret used for seeding in your project. Adjust the language and structure as needed.