DEV Community

Cover image for Beacon:Illuminating Your Path to Success
Divya Pankaja Nanda
Divya Pankaja Nanda

Posted on

Beacon:Illuminating Your Path to Success

This is a submission for the GitHub Copilot Challenge : New Beginnings

What I Built

Beacon: Illuminating Your Path to Success

Beacon is a dynamic platform designed to empower individuals to set, manage, and track their goals while fostering a community of like-minded achievers. It provides a unique space where users can not only work towards their aspirations but also find motivation, guidance, and camaraderie from others who share similar objectives.

Core Features
Goal Creation & Management:
Users can define goals with flexibility, choosing to include a detailed task list or keep it simple. Goals can be categorized as:

Private: Visible only to the creator, with invitations required for others to join.
Protected: Others can request to join, and approval is at the creator’s discretion.
Public: Open to everyone, fostering a collaborative and supportive environment.
Progress Sharing:
Users can post updates about their progress, tracking their growth over time. A built-in analytics feature provides insights and visualizations, enabling users to compare their progress with others, sparking healthy competition and enhanced motivation.

Future Enhancements
Real-Time Communication:
Introducing group chat capabilities to enable seamless communication, idea sharing, and encouragement among group members.

AI-Powered Task Assistance:
Leveraging AI to help users generate comprehensive task lists and estimate the time required to achieve their goals. This will simplify planning and improve time management.

Current Status

The API for Beacon is fully developed, and the frontend is actively under construction.

Demo

Image description

API Design

API Routes

Authentication Routes

  • POST /api/v1/auth/signup - Register a new user
  • POST /api/v1/auth/login - Login user
  • POST /api/v1/auth/logout - Logout user
  • POST /api/v1/auth/refresh-token - Refresh access token
  • GET /api/v1/auth/me - Get current user profile

User Routes

  • GET /api/v1/users/email/:email - Find user by email
  • GET /api/v1/users/username/:username - Find user by username
  • GET /api/v1/users/name/:name - Find user by name
  • GET /api/v1/users/:userId - Get user by ID
  • PATCH /api/v1/users/:userId - Update user
  • DELETE /api/v1/users/:userId - Delete user

Goal Routes

  • POST /api/v1/goals - Create a new goal
  • GET /api/v1/goals/title/:title - Find goal by title
  • GET /api/v1/goals/:goalId - Get goal by ID
  • GET /api/v1/goals - List all goals
  • PATCH /api/v1/goals/:goalId - Update goal
  • DELETE /api/v1/goals/:goalId - Delete goal

Membership Routes

  • POST /api/v1/memberships - Create membership
  • GET /api/v1/memberships/:membershipId - Get membership by ID
  • GET /api/v1/memberships/user/:userId/goal/:goalId - Get membership by user and goal
  • GET /api/v1/memberships - List all memberships
  • GET /api/v1/memberships/goal/:goalId - List goal memberships
  • PATCH /api/v1/memberships/:membershipId - Update membership
  • DELETE /api/v1/memberships/:membershipId - Delete membership

Post Routes

  • POST /api/v1/posts - Create a new post
  • GET /api/v1/posts/:postId - Get post by ID
  • GET /api/v1/posts/goal/:goalId - List posts by goal
  • GET /api/v1/posts/user/:userId/goal/:goalId - List user's posts in a goal
  • GET /api/v1/posts - List user's posts
  • PATCH /api/v1/posts/:postId - Update post
  • DELETE /api/v1/posts/:postId - Delete post

All routes except authentication routes require authentication token in the request header.

Repo

GitHub logo DivyaPankajaNanda / beacon

A platform where people with common goals and come together and help each other.

beacon

A platform where people with common goals and come together and help each other.

Project Setup

Backend :

  1. Clone the repository:

    git clone <<repository>>
    cd beacon
    Enter fullscreen mode Exit fullscreen mode
  2. Navigate to the backend directory:

    cd backend
    Enter fullscreen mode Exit fullscreen mode
  3. Install dependencies:

    npm install
    Enter fullscreen mode Exit fullscreen mode
  4. Set up environment variables: Create a .env file in the root directory and add the necessary environment variables. (For reference .env.sample file is provided with all the environment variables used in the project.)

  5. Run the development server:

    npm run start
    ```    ```
    Enter fullscreen mode Exit fullscreen mode

Frontend :

  1. Navigate to the frontend directory:

    cd frontend
    Enter fullscreen mode Exit fullscreen mode
  2. Install dependencies:

    npm install
    Enter fullscreen mode Exit fullscreen mode
  3. Run the development server:

    npm run dev
    Enter fullscreen mode Exit fullscreen mode



Copilot Experience

GitHub Copilot has transformed the way I approach development, making the entire process more efficient, intuitive, and seamless. Here's a breakdown of its key features based on my experience:

1. Autocomplete Inside the IDE
The autocomplete feature is a game-changer. It significantly accelerated my development speed by suggesting context-aware code snippets, reducing the time spent typing repetitive code or recalling syntax from memory. This feature not only improved efficiency but also minimized errors, eliminating the need for mundane tasks like copy-pasting or retyping commands.

2. Inline Chat for Suggestions and Explanations
The inline chat functionality enhanced my coding workflow by allowing me to explore multiple solutions while creating or modifying code. It provided immediate explanations for suggestions with the /explain command, which was particularly helpful for clearing up doubts. Moreover, inline chat in the terminal reduced the dependency on external resources like documentation by directly suggesting and explaining commands.

3. Chat for Contextual Assistance
The chat feature stood out as the most impactful. By adjusting the context with additional files, I could ask Copilot to generate code tailored to a specific task while considering the context of the project. The ability to insert the generated code directly into the editor or at the cursor’s location streamlined the development process, ensuring precision and saving time.

4. Model switching
Both models performed similarly when generating code for the same instructions. However, I did notice slight differences in the quality of their explanations. The finesse and clarity of the explanations varied slightly depending on the context. Beyond that, there weren’t any significant differences in terms of developer experience. Overall, either model can effectively complete tasks based on the provided instructions.

Overall Experience
GitHub Copilot seamlessly integrates with the development workflow, offering intuitive solutions and explanations that not only improve productivity but also enhance the developer’s understanding of the code. Its ability to reduce friction in coding tasks makes it an invaluable tool for modern developers.

Highly recommended for developers looking to boost productivity, reduce errors, and focus more on creativity and problem-solving!

Conclusion

Building Beacon with the help of GitHub Copilot was a fantastic experience. Copilot streamlined the development process by eliminating mundane tasks, significantly boosting development velocity, and enhancing the overall developer experience. Its intuitive features made coding more efficient and enjoyable, allowing me to focus on creativity and problem-solving.

Top comments (0)